Claes Norreen
Active User
Joined: 20 Dec 2005 Posts: 137 Location: Denmark
|
|
|
|
Hi Experts!
I have an exciting task for you... I have a hierarchy structure in a database unloaded to a dataset. The data has the following layout:
ID1ID2
ID1ID3
ID3ID6
ID2ID4
ID4ID5
etc
...where the leftmost ID is the parent of the rightmost each ID. So, the top of each hierarchy is defined as an ID not present in the rightmost side, ie. the ID only has parent relations. There can be max. 9 levels in the hierarchy, and each ID is defined as ZD 20. Each ID can only be present in ONE hierarchy structure.
My requirement for output is a flat version of the hierarchy, meaning I need one record per top point of each hierarchy, including all the IDs that belongs to it. In the example given, the output would be:
ID1ID2ID3ID6
ID2ID4ID5
Any help appreciated! |
|