I have a table having user_id, User_name, Manager_id where
user_id is self joined to manager_id. user_id is primary key and manager_id is foriegn key refering user_id.
Can any one tell me how can i make a query that can return
the hierarchy of all the managers of a user_id entered.
E.g. 2 is manager of 1, 3 is manager of 2, 4 is manager of 3, 5 is manager of 7.
when i give 1 - i want the result as
2
3
4
user_id is self joined to manager_id. user_id is primary key and manager_id is foriegn key refering user_id.
Can any one tell me how can i make a query that can return
the hierarchy of all the managers of a user_id entered.
E.g. 2 is manager of 1, 3 is manager of 2, 4 is manager of 3, 5 is manager of 7.
when i give 1 - i want the result as
2
3
4