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: connect by -- return top root

Re: connect by -- return top root

From: Marc Billiet <someone.overthere_at_living>
Date: Thu, 28 Sep 2000 05:33:52 GMT
Message-ID: <20000928.5335211@slu4508f.hae.hydro.com>

But in that case, variable 'object to check' will always be NULL. I thin k
the query should be:

 SELECT child object id /* and not : parent object id */    INTO object to check
   FROM inherited object permission
   WHERE parent object id IS NULL
   START WITH child object id = i child id    CONNECT BY child object id = PRIOR parent object id

Marc

>>>>>>>>>>>>>>>>>> Oorspronkelijk bericht <<<<<<<<<<<<<<<<<<

Op 2000-09-27, 22:15:00, schreef "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> over het thema Re: connect by -- return top

root:

> add
> where parent object id is null
 

> Hth,
 

> Sybrand Bakker, Oracle DBA
 

> <redrobin723_at_my-deja.com> wrote in message
> news:8qtgie$dp5$1_at_nnrp1.deja.com...
> > I need to query a table to find the top most parent id. I only want
 to
> > return the one parent id, not the whole tree.
> >
> > The table is:
> >
> > inherit object permission
> > --------------------------
> > parent object id
> > child object id
> >
> > My select statement is: (where i child id is the incoming parameter)
 

> > SELECT parent object id INTO object to check
> > FROM inherited object permission
> > START WITH child object id = i child id
> > CONNECT BY child object id = PRIOR parent object id
> >
> > It returns the whole tree...
> > Please help!!
> >
> > Thanks in advance,
> > -R.
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
Received on Thu Sep 28 2000 - 00:33:52 CDT

Original text of this message

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