I have a complex insert statement that joins to a table that is specific to a small number of employees in our company, hence I need an outer join. The problem is that I have to join to the MAX(effective_sequence_nbr) with an outer join. I keep getting errors on that join
example
and a.effseq = (SELECT max(d.effseq(+))
FROM load_empl_hist_comp d
WHERE d.emplid = a.emplid
AND d.effective_date_key = a.effective_date_key
AND d.effseq <= a.effseq)
ERROR at line 99:
ORA-01705:
an outer join cannot be
specified on a correlation column
OK so where do I put the (+)???
Thanks in advance
example
and a.effseq = (SELECT max(d.effseq(+))
FROM load_empl_hist_comp d
WHERE d.emplid = a.emplid
AND d.effective_date_key = a.effective_date_key
AND d.effseq <= a.effseq)
ERROR at line 99:
ORA-01705:
an outer join cannot be
specified on a correlation column
OK so where do I put the (+)???
Thanks in advance