Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Outer join problem
On 29 Aug 2005 10:22:38 -0700, gabriel.gibaut_at_gmail.com wrote:
>I know the Select * will provide more than enough errors stating
>'column ambiguously defined'. But my problem is not related to it, i
>was just triyng to simplify things.
>
>So:
>
>Error: ORA-01417 A table may be outer joined to at most one other
>table.
>Oracle Version: 8.1.6.0
>
>The simplified structure with just the fields involved is the
>following:
>
>Table A
>ID_TableA PK
>AttribXYZ NULL
>
>Table B
>Id_TableB PK
>
>Table C
>ID_TableA PK (references TAbleA.ID_TableA)
>ID_TableB PK (references TableB.ID_TableB)
>
>Table D
>AtribXYZ PK (References Table A.AttribXYZ)
>ID_TableB PK (References TableB.IdTableB)
>
>SELECT * FROM A, C, B, D
>WHERE
> C.IDTableA = A.IdTableA AND
> C.IdTableB = B.IdTableB AND
> A.AttribXYZ = D.AttribXYZ (+) AND
> B.IdTableB = D.IdTableB (+)
>
>Thanks
>
>Gabriel
As I understand from the above, you want to look up a record from D related to A, and you want to look up a record from D related to B. Do you really want this to be the same record from D? If not, specify table D twice in your from-list and join the first with A and the second with B.
Jaap. Received on Mon Aug 29 2005 - 13:34:13 CDT