Hi,
I wanted to know , how we can implement the job to retrieve the hierarchical data. The exampale would is as below
lets say we have a table a and three columns id1,name,id2. I need to get the all the parents of id1. for ex: if i have the below values in id1 and id2 field
id1 id2
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10
i need to get all the 10 records in the output
getting Hierarchical data
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 36
- Joined: Fri May 21, 2010 12:40 am
- Location: Bangalore
getting Hierarchical data
Sandeep Chandrashekar
What database? For Oracle, you have CONNECT BY and I imagine other products have something similar.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 36
- Joined: Fri May 21, 2010 12:40 am
- Location: Bangalore
retreiving hierarchy data using datastage
yes it is oracle, but my question is whether we can implement this using datastage or not.
Sandeep Chandrashekar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Otherwise, perhaps the judicious use of a hashed file would work or perhaps a lookup with multi-row result set enabled. It's hard for me to tell from your example since all of the numbers run sequentially. Those "10 records" you need in your output come from how many input records - 1? 10?
Spell out for us in words the process each input row must go through to generate the proper output(s).
Spell out for us in words the process each input row must go through to generate the proper output(s).
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers