Stored procedures | SQL 2005 Adventure Works OLTP |
Stored procedure using a recursive query to return the direct and indirect managers of the specified employee.
Syntax
dbo.uspGetEmployeeManagers ( EmployeeID )
Parameters
Variable Data Type Required Output Description EmployeeID int Yes No Input parameter for the stored procedure uspGetEmployeeManagers. Enter a valid EmployeeID from the HumanResources.Employee table.
Properties
Modifies data Transactional Uses cursors Executes procedures Dynamic content Encrypted No No No No No No
Data Source Activity
Accesses Description EMP_cte HumanResources.Employee Employee information such as salary, department, and title. Person.Contact Names of each employee, customer contact, and vendor contact.
Output Recordset
Column Description RecursionLevel EmployeeID FirstName LastName ManagerID ManagerFirstName ManagerLastName
Data source Description EMP_cte HumanResources.Employee Employee information such as salary, department, and title. Person.Contact Names of each employee, customer contact, and vendor contact.
Applies to
Stored procedures | Returns data