Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Finding the "last node" in a hierarchical query?

784546Jul 12 2010 — edited Jul 13 2010
I'm presented with an issue - find all parent records for which the "last node" in a hierarchy is not set to some value.

Table structure:

child_id number
parent_id number
type_id number

So, I need to find all parents whose eventual last "children" (could be several levels deep, it varies) do not have a type_id of 29.

I can find the hierarchy easily using connect by prior but I'm stuck on that "last node" bit. Any help out there?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2010
Added on Jul 12 2010
8 comments
4,724 views