John500
asked on
USING curly braces ' { } ' as part of JOIN
Need help understanding the purpose or use of the braces in this statement:
SELECT .....
FROM TABLE_1 A, TABLE_2 B, TABLE_3 C,
{ oj { oj TABLE_4 D LEFT OUTER JOIN
TABLE_5 E ON D.umLocationID = E .umLocationID } LEFT OUTER JOIN
TABLE_6 F ON D.umLocationID = F.umLocationID } INNER JOIN
WHERE
...
How would this query be interpreted? Isn't there an easier way to do what's trying to be done here?
I take it the notation ' oj ' means to do an OUTER JOIN on the results of the statement located inside the braces ?
Thanks
SELECT .....
FROM TABLE_1 A, TABLE_2 B, TABLE_3 C,
{ oj { oj TABLE_4 D LEFT OUTER JOIN
TABLE_5 E ON D.umLocationID = E .umLocationID } LEFT OUTER JOIN
TABLE_6 F ON D.umLocationID = F.umLocationID } INNER JOIN
WHERE
...
How would this query be interpreted? Isn't there an easier way to do what's trying to be done here?
I take it the notation ' oj ' means to do an OUTER JOIN on the results of the statement located inside the braces ?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, so if I remove the 'oj' syntax, does that have any impact on the results? If I run this query in the editor, I get data back. If I take off the 'oj' syntax and the associated braces, I get no data back. I don't get any errors but I don't get any data?
What am I missing?
Thanks
What am I missing?
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
when you say take off, exactly what is the syntax you have left?
please clarify that you are using SQL server 2008 and editor you are referring to is SQL management studio. Paste the query you are using that returns no data and can try to help troubleshoot -- but should take a look here at syntax: http:#a32358114
please clarify that you are using SQL server 2008 and editor you are referring to is SQL management studio. Paste the query you are using that returns no data and can try to help troubleshoot -- but should take a look here at syntax: http:#a32358114
ASKER
Thanks!
I got it to work and it was something stupid.
I got it to work and it was something stupid.
http://support.microsoft.com/kb/142930