Hi,
I am applying left join twice on the same table and getting an error message
Here is my sample query (followed by the error message)
Select
H.*
FROM
TBL_A H
INNER JOIN TBL_B D ON H.ID_NO = D.ID_NO
INNER JOIN TBL_C S ON H.ID_NO = S.ID_NO
LEFT JOIN TBL_D DT ON DT.ID_NO = H.ID_NO AND DT.G_NO = 1
LEFT JOIN TBL_D DTSL ON DTSL.ID_NO = H.ID_NO AND DTSL.G_NO = D.ITEM_CAT
LEFT JOIN TBL_E LSL ON D.ITEM_CAT = LSL.ID
WHERE H.ID_TYPE = 1
AND H.JOB_DATE > TO_DATE('2000-01-01', 'yyyy-mm-dd')
Here is the error message:
ORA-01417: a table may be outer joined to at most one other table ORA-02063:
it works fine when I remove one of the Left join from tbl_D above
please advise