mario17 (8/21/2014)
<<What it's saying is that IF the Left join row exists , INNER join to that other table.Otherwise, treat it like a regular LEFT join and put NULL in the JOINED columns.>>
Just got feedback from one top notch pro like above on that, so it's OK. It's definetely works and works very fast.
Sorry Jack, didn't get what good or worse in this case?
Thanks
M
The example you posted doesn't compile. I get:
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near 'LogID'.
When trying to parse the query. I've also tried this:
SELECT
*
FROM
sys.tables AS T
LEFT JOIN sys.columns AS C
JOIN sys.index_columns AS IC
ON C.column_id = IC.column_id
To make sure the issue wasn't related to non-existent objects and I still get the same error. So I'm not sure how the code as presented could work.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question