I am havin a query as
SELECT * FROM Issue I, Condition C, Result R, Status S
LEFT JOIN Issue as i1 ON C.ID = i1.ConditionID
LEFT JOIN Issue as i2 ON R.ID = i2.ResultID
LEFT JOIN Issue as i3 ON S.ID = i3.StatusID
WHERE I.ID = 452
which is giving me the error message:
The multi-part identifier “C.ID” could not be bound.
The multi-part identifier “R.ID” could not be bound.
I want to have a result as follows:
ID| IssueName| ConditionID| ResultID| StatusID| ID| ConditionName| ID| ResultName| ID| StatusName
First, there’s no JOIN between relation `I’ and any other in your posted query, so you’ll end up with a cartesian join here.
Using the old-fashioned joining the query might look like this:
Using ANSI join syntax: