overDeveloper
Programmer
I have the following query (thanks gmmastros)
Now, I need to do one change to it. I have a separate table that has a field that corresponds to a.id. I want to change it so that if Table C does not have an a.id value in that field then a.id is left out of the results. make Sense? I tried an inner join-ing Table c but that returned duplicate records....
Code:
Select A.Name + '/' + B.Name As OutputColumn
From TableName A
Inner Join TableName B
On A.Id = B.ParentId
Union All
Select Name
From TableName
Where ParentId = 0
Order By OutputColumn
Now, I need to do one change to it. I have a separate table that has a field that corresponds to a.id. I want to change it so that if Table C does not have an a.id value in that field then a.id is left out of the results. make Sense? I tried an inner join-ing Table c but that returned duplicate records....