Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Hierarchy of managers for specific employee Expand / Collapse
Author
Message
Posted Wednesday, June 12, 2013 1:31 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 4:19 AM
Points: 183, Visits: 472
Hi All,

I want to find Hierarchy of managers for specific employee. For example if I run query for David Then Output like below

MANAGER Hierarchy Level
Abhas 1
Mike 2
John 3
David 4


I am having two tables. Employee where all employee details are stored. I need to fetch Employee Name as MANAGER from this table. And ManagerID from Supervisor Table.

Post #1462485
Posted Wednesday, June 12, 2013 6:58 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 8:33 AM
Points: 2,616, Visits: 4,720
It would be really helpful if you provide the DDL of the tables Employee and Supervisor
Some sample data and the expected results based on the sample data would help us in giving you tested solutions

If you are not sure how to provide all this, please go through the link in my signature.



Kingston Dhasian

How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1462606
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse