Hi All,
I have the following requirement and have to design a job to meet the same.
The source Table A has to load target Table B with hierarchy information.
For Example
Table A
Parent Column Child Column
200 100
300 200
600 500
800 700
1000 900
Table B
Level_1 Level_2 Level_3
100 200 300
500 600 700
900 1000 1000
So basically the child 100's parent is 200 who's parent is 300. The child 900 has only one parent 1000 and hence the level_3 will have the same value as Level_3.
Here Level_1 is the lowest level.
Thanks
Help in designing the job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
Code: Select all
select t1.parent, t1.child, t2.parent
from tablea t1 left outer join tablea t2
on t1.parent = t2.child
You are the creator of your destiny - Swami Vivekananda
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad