Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: should one use ANSI join syntax when writing an Oracle application?

RE: should one use ANSI join syntax when writing an Oracle application?

From: Wolfgang Breitling <breitliw_at_centrexcc.com>
Date: Wed, 18 Oct 2006 13:09:26 -0700
Message-ID: <1161202166.453689f6e35f4@webmail.hosting.telus.net>


OK, I've got it.

select AA.x, AB.y, AC.z
from A AA

 inner join B  AB on ( AA.x = AB.x )
 inner join C  BC on ( AB.x = BC.x )
 inner join C  AC on ( AA.x = AC.x )

;

will do the trick. But now it's not so clear anymore that this is the result of explicitly coding the transitive closure.

Quoting Wolfgang Breitling <breitliw_at_centrexcc.com>:

> Quoting Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>:
> I need some help here. How do I code a full transitive closure join with the
> new
> syntax? In the traditional syntax I can say:
>
> select A.x, B.y, C.z
> from A, B, C
> where A.x = B.x
> and B.x = C.x
> and A.x = C.x
> /
>
> How do I do that with the newfangled syntax. When I try
>
> select A.x, B.y, C.z
> from A
> inner join B on ( A.x = B.x )
> inner join C on ( B.x = C.x )
> inner join C on ( A.x = C.x )
> ;
>
> I get
> select A.x, B.y, C.z
> *
> ERROR at line 1:
> ORA-00918: column ambiguously defined
>

-- 
regards

Wolfgang Breitling
Oracle 7,8,8i,9i OCP DBA
Centrex Consulting Corporation
www.centrexcc.com

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 18 2006 - 15:09:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US