Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> connect by
I need to select ONLY the top most parent id from a table which includes parent/child ids.
I'm using connect by, but can only seem to retrieve the entire list of relationships, not just the top node.
The table is:
inherit_object_permission
The query:
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;
Please help!
Thanks in advance.
-R.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Sep 27 2000 - 14:30:45 CDT
![]() |
![]() |