All Forums Database
JKB 3 posts Joined 12/15
25 Feb 2016
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
 

Adeel Chaudhry 773 posts Joined 04/08
06 Mar 2016

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

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.