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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01437: cannot have join with CONNECT BY

Re: ORA-01437: cannot have join with CONNECT BY

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: 10 Sep 2003 14:34:59 -0700
Message-ID: <73e20c6c.0309101334.5b518e65@posting.google.com>


"Jay" <no_at_spam.com> wrote in message news:<bjno67$m9h$1_at_msunews.cl.msu.edu>...
> Can I use "connect by" in view?
> The view is created from joining 2 tables.
>
>
> I was trying
>
> SELECT col1
> FROM view1
> START WITH col1= 45034
> CONNECT BY PRIOR col2= col1;
>
> and getting
>
> ORA-01437: cannot have join with CONNECT BY
>

No, you can't. At least not in 8i. Dunno about 10, though. What you can do is use the connect by in the original tables and join the result in a view.
Kinda like:

select ...
from ( select ... from TA where ... connect by ... start with ...) t1,

     ( select ... from TB where ... connect by ... start with ...) t2 where t1.col1 = t2.col1;

HTH Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam Received on Wed Sep 10 2003 - 16:34:59 CDT

Original text of this message

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