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

  • From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
  • To: breitliw@xxxxxxxxxxxxx
  • Date: Wed, 18 Oct 2006 13:09:26 -0700

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@xxxxxxxxxxxxx>:

> Quoting Jacques Kilchoer <Jacques.Kilchoer@xxxxxxxxx>:
> 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

--
//www.freelists.org/webpage/oracle-l


Other related posts: