Hello every one,
I have a requirment where i need to find the child level. My source data is like
A
/ \
B C
/ \ / \
D E F G
/ \ / \ / \ / \
H I J KL M N O
Parent Child
a B
a C
b D
b E
c F
c G
: :
In the target table i need to find the level of the child, ie B is a Child of A
so its level will be 1 and D is child of B so its level will be 2
Target table looks like
Parent Child Level
a B 1
a C 1
b D 2
b E 2
c F 2
c G 2
: : :
Is there any way i can do that in datastage? my source is Oracle and i know that using connect by prior function i can achieve that in oracle but i want to know if i can do that in Ds, in my next step after finding the level i need to reprocess the data from child to parent and flag them based on some other logic.
Finding Child Level
Moderators: chulett, rschirm, roy
Re: Finding Child Level
I had a posted the same query earlier ... Maybe u should check out this link
viewtopic.php?t=106418&highlight=diff%2A+levels
I decided to go for the Oracle method .. used the LEVEL pseudocolumn, connect by, etc etc...
viewtopic.php?t=106418&highlight=diff%2A+levels
I decided to go for the Oracle method .. used the LEVEL pseudocolumn, connect by, etc etc...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: