Oracle - Generation format to Parent / child format hierarchies

Hello Gurus,
I have a hierarchy in generation format and need to convert it to parent / child format.  Does someone have some SQL code to do this?  I'm in a time crunch and this is an unexpected obstacle.  Any help is very much appreciated!

Thanks!
Cheryl McCormickConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
do you have sample data and expected output?
0
Cheryl McCormickConsultantAuthor Commented:
Please see attached.  Expected format is parent / child.

Thanks for such a quick reply!
Sample-GEN-Data.xls
0
sdstuberCommented:
what do you mean by "parent /child" format?

2 tables with an index between them?

hierarchical results sorted by parents?

something else?

0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Cheryl McCormickConsultantAuthor Commented:
I need to create a table that shows the parent value in one column and the child value in the second column.  Based on the same it would look like this:

PARENT Col                                  CHILD Col
STRPNL                                         NETCON
NETCON                                        TOTCON
NETCON                                        NONSTR

etc.  Pretty basic parent / child relationship derived from the generation format of the source table.                                    
0
sdstuberCommented:
your source data is strings with whitespace indenting?
or  actual columns ?

or do you have a data an level column as if generated from a hierarchical query?

in other words, what is your excel file trying to show me?

I get the "visual" parent/child relationships, what is the actual data?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cheryl McCormickConsultantAuthor Commented:
The table looks just like the EXCEL spreaadsheet.  Each level is represented in a column.  There are null values... again, just like the excel spreadsheet but in unique columns per level.
0
sdstuberCommented:
how are you controlling the ordering of rows?

for instance,  how do we know 414300 is a child of REVESP and not of REVDRP?

what put it on row 11 vs row 14?
0
Cheryl McCormickConsultantAuthor Commented:
Question not completely answered.
0
sdstuberCommented:
you shouldn't give penalty grades while there are still pending questions to you.

the question could not be answered completely until you gave feedback
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.