Stored procedures SQL 2005 Adventure Works OLTP

dbo.uspGetEmployeeManagers

Object type: Stored procedure

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
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.