Friends, please help with this urgent problem: How can an outer join be written on more than one table?
An SQL Server query:
SELECT * from a INNER JOIN b on a.id = b.id LEFT OUTER JOIN c ON c.id = a.id AND c.id = b.id
works fine with SQL SERVER
But Oracle query:
SELECT * from a,b,c WHERE a.id = b.id AND a.id = c.id (+) AND b.id = c.id (+)
gives an error: OUTER JOIN cannot be used on more than one table? Why?
Here's the exception number and short description
- java.sql.SQLException: ORA-01417: a table may be outer joined to at most one other table
Oracle says you have to join b and c in a view first.
SELECT * from a,b,c
WHERE a.id = b.id AND
a.id = c.id (+)
and b.id in (select b.id from b,c where b.id = c.id (+));
Click Here to Expand Forum to Full Width