Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Write a program to find the immediate Manager and all the superiors for employee number ‘104’.


EmployeeId ---ManagerId ---Designation
101 -- -- -- CEO
102 -- 101 -- GM
103 -- 102 -- MANAGER
104 -- 103 -- SOFTWARE ENGINEER
105 -- 103 -- SOFTWARE ENGINEER



From the above mentioned data structure, Write a program to find the immediate Manager and all the superiors of employee 104.

The above mentioned data structure holds employeeId, ManagerId, designation
Posted
Updated 11-Apr-12 3:32am
v2

 
Share this answer
 
Comments
prabakaransat 9-May-12 7:57am    
Thank u very much..
this link helps me a lot
kevin_ze 9-May-12 8:02am    
ur Welcome
Use this link

http://vyaskn.tripod.com/hierarchies_in_sql_server_databases.htm[^]


I know you will come back with a question because you have directly posted the contents of requirement doc without any efforts from your side... :)
 
Share this answer
 
v3
Homework is not done here.
At least try out to put the algorithm, then some one can help you to put the code pieces
 
Share this answer
 
Comments
Nilesh Patil Kolhapur 11-Apr-12 9:06am    
i agree sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900