The code SQL below is what I want to do but it's not working. Eventually I will convert that to LinQ query but for now, I just want to know how to make this works. I have one line matching in TemplateFields when I put where templateId =29 table and I want to full outer join with the TemplateAvailableFields. How can I use select right after full outer join?
select
ta.TemplateAvailableFieldId, ta.FieldName, ta.Required
from
TemplateAvailableFields as ta
full outer join
(select DefaultValue, DisplayOrder
from TemplateField
where TemplateId = 29) as t on ta.TemplateAvailableFieldId = t.TemplateAvailableFieldId;