Struggling with Oracle outer join syntax.
We have this query with inner and outer joins;
SELECT A.aa, B.bb, C.cc, D.dd
FROM
TABLEA A, TABLEB B, TABLEC C, TABLED D
WHERE
A.XX = B.XX AND
B.YY = C.YY AND
C.ZZ = D.WW (+)
The query works fine. A change is now it's possible that the link between table A and B (on XX) may not be present.
So we'd like to turn this into an outer join which returns data regardless of whether the existing joins are satisfied OR if there is no link between A and B (and the other tables).
How can you do this?
Say you have your tables like the following:
If I understand well, you need to use on outer join even on B and C, not only D; in the old Oracle syntax this is:
And in (better) ANSI SQL:
They both give: