SQL Supervisor in a hierarchy
Posted on 2014-08-11
Thank you in advance for any feedback.
I have downloaded Adventure works 2012 SQL Database.
I would like to get the supervisor id for an employee, but I don't understand all the heriarchy thing that is being used under organizationNode of HumanResources.Employee table.
Having a procedure that receives an employee id, inside the procedure I would like to be able to
obtain the supervisor's id. Not have all the managers, but the immediate supervisor to an employee.