Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: about hierarchical query
yes, but
select level, node
from mytable
start with parent_id is null
connect by prior id = parent_id
*returns all tree*
select level, node
from mytable
where mycondition
start with parent_id is null
connect by prior id = parent_id
*returns only leaves*:
level node
--------- ---------
3 C1 3 C5 3 C6
I've tried:
- where condition in "start with" statement is apply to roots
- where condition in "connect by" statement is apply only to first level
under roots
How can I proceed?
thanks
Paolo
IANAL_VISTA wrote:
> Erpa <Erpa_at_email.it> wrote in news:cmt01j$2h8$1_at_newsread.albacom.net: > >
> > > CONNECT BY clause on SELECTReceived on Wed Nov 10 2004 - 09:14:11 CST