Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01417 : A table may be outer joined to at most only one table.

PatzaApr 7 2008 — edited Apr 8 2008
Hi,

I have the following problem:


Table PROD
=========
PROD_ID PROD_NAME PROD_MGR PROD_CONTROLLER PROD_SUP
==========================================================
P1..............XYZ .................4323
P2..............LMN......................................4353............................9321
P3..............PQR.................4655..............4353
P4..............UVW................4323.................................................9321


Table EMP
========

EMP_ID EMP_NAME
==================
4323...........Tom Kyte
4353...........John B.
9321...........Elvis P.
4655...........Jim C.

I need to write a query to get the following results:

PROD_ID PROD_NAME PROD_MGR PROD_CONTROLLER PROD_SUP
==========================================================
P1..............XYZ..................Tom Kyte
P2..............LMN........................................John B.........................Elvis P.
P3..............PQR..................Jim C.............John B.
P4..............UVW.................Tom Kyte...........................................Elvis P.

I tried the following :

select PROD_ID,
PROD_NAME,
E1.EMP_NAME,
E2.EMP_NAME,
E3.EMP_NAME
from PROD P,
EMP E1,
EMP E2,
EMP E3
where P.PROD_MGR (+) = E1.EMP_ID and
P.PROD_CONTROLLER (+) = E2.EMP_ID and
P.PROD_SUP (+) = E3.EMP_ID

but this gives me the error ORA-01417 : A table may be outer joined to at most only one table.

Is there any other way of doing this. The main objective is to display all rows from PROD table and replace emp Id's with their names.

Please advice..

Thanks...

-Pat
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2008
Added on Apr 7 2008
5 comments
466 views