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!

Parent Child Relationship

fieryknight81Oct 28 2019 — edited Oct 31 2019

Hi,

i have a table like this:

 

PARENTCHILD
12
23
34
45
56
67

i want to display the result like:

 

PARENTCHILD
12,3,4,5,6,7
23,4,5,6,7
34,5,6,7
45,6,7
56,7
67

logic is 1 is the parent for 2 but since 2 is a parent of 3 so 3 also falls under 1 and same for 4,5,6 and 7.

same goes from parent 2 and so on.

really appreciate your help.

Thanks.

This post has been answered by Frank Kulash on Oct 29 2019
Jump to Answer
Comments
Post Details
Added on Oct 28 2019
8 comments
737 views