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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question on SELECT LEVEL...CONNECT BY, tree-walking

Re: Question on SELECT LEVEL...CONNECT BY, tree-walking

From: Geoff White <whiteg_at_ccis.adisys.com.au>
Date: Wed, 14 Apr 1999 10:48:02 +0800
Message-ID: <371401E2.D37DBB6C@ccis.adisys.com.au>


You have omitted the PRIOR keyword. Should be something like  6 CONNECT BY PRIOR psf_part = psf_assy (I haven't tested the logic of this but it is the syntax).
Re-read the Hierarchical Queries section of the SQL Manual for examples and explanations.

and BTW we don't laugh.

HTH
Geoff

hlh_nospam_at_excite.com wrote:

> I'm having some difficulty with SELECT LEVEL...CONNECT BY, as illustrated
> below. Note that in the first query, assembly# 502-23125-00 occurs at level
> 1, with no expansion. However, as shown in the second query, it contains
> several parts. I thought perhaps the level was not being expanded because
> there wasn't another level below, but as shown in listing 3, this is not the
> problem.
>
> I'm hoping that my error is obvious, and that somebody, after he/she recovers
> from the gales of laughter, is kind enough to point it out...
>
> listing 1
> SQL> SELECT level,
> 2 psf_find_nbr,
> 3 psf_part,
> 4 psf_assy
> 5 FROM sec_psf_effective_view
> 6 CONNECT BY psf_part = psf_assy
> 7 START WITH psf_assy = '502-25700-00';
> [snip]
Received on Tue Apr 13 1999 - 21:48:02 CDT

Original text of this message

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