Hello, SQL2008R2
I may have asked this before but here we go:
If I have a LEFT join that needs to INNER join to a table the number of records returned change.
I thought a left join would return all records for the left side?
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
I may have asked this before but here we go:
If I have a LEFT join that needs to INNER join to a table the number of records returned change.
Code:
SELECT A.*
FROM A
INNER JOIN B ON A.V1 = B.V1
LEFT JOIN C ON A.V2 = C.V2
-- gives 3 records
INNER JOIN D ON C.V3 = D.V3
-- by adding this one line it gives 1 record
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!