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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 27 Sep 2000 22:15:00 +0200
Message-ID: <970085827.28516.0.pluto.d4ee154e@news.demon.nl>

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 Wed Sep 27 2000 - 15:15:00 CDT

Original text of this message

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