-
Hi!
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?
Please, help!
-
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
-
Hi,
Oracle says you have to join b and c in a view first.
Try this:
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 (+));
regards,
R.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|