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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to get all dependent child and there level to a top most parent node using Oracle SQL?

Learning_BeeJul 19 2017 — edited Jul 19 2017

From the below data set I need to find out the list of all dependent child of a parent and there level of relationship with the top most parent !! , Friends need your inputs!!

Sample dataset:

Table: Family

parent
child
12
23
34
78
89

Input is top most parent: 1,7

Expected Output:

parent
child
level to parent
121
132
143
781
792
This post has been answered by mathguy on Jul 19 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2017
Added on Jul 19 2017
10 comments
4,759 views