Hi,
I have a table with following columns and rows :
EMP_ID DESIGNATION SUPERVISOR_ID
1 Programmer(East) 7
3 Programmer(West) 11
4 Global Manager(East) 4
6 Sr. Proj Manager(East) 4
7 Project Manager(East) 6
10 Global Manager(West) 10
11 Project Manager(West) 12
12 Sr. Proj Manager(West) 10
I need to create a view based on above table. It should display
EMP_ID IMMEDIATE_SUPERVISOR TOP_SUPERVISOR
1 7 4
3 11 10
4 4 4
6 4 4
7 6 4
10 10 10
11 12 10
12 10 10
I really appreciate your suggestions/logic to write this view.
Thanks
I have a table with following columns and rows :
EMP_ID DESIGNATION SUPERVISOR_ID
1 Programmer(East) 7
3 Programmer(West) 11
4 Global Manager(East) 4
6 Sr. Proj Manager(East) 4
7 Project Manager(East) 6
10 Global Manager(West) 10
11 Project Manager(West) 12
12 Sr. Proj Manager(West) 10
I need to create a view based on above table. It should display
EMP_ID IMMEDIATE_SUPERVISOR TOP_SUPERVISOR
1 7 4
3 11 10
4 4 4
6 4 4
7 6 4
10 10 10
11 12 10
12 10 10
I really appreciate your suggestions/logic to write this view.
Thanks