Hierarchial Data Sorting

Database
JKB
Fan

Hierarchial Data Sorting

Hi,

I have created a table which have Parents and its Children. But the User Needs a Sort field which gives the expanded Hierarchy of the Parent. Example given below. PLease let me know how to achieve this in Teradata.

Eg:

PARENT -->CHILD

*087P001 -- 087P001

**087P001--0873000

**087P001--087P100

***087P001--0873100

***087P001--0873300

**87P001--087P200

***087P001--0872100

***087P001--0872200

1 REPLY
Teradata Employee

Re: Hierarchial Data Sorting

Whats the structure of the table? Parent & child are in separate columns or in one? Have you tried ORDER BY Parent, Child?