Thank you so much.
I tried your coding, but I got different twist of results than what I expected.
Instead having all the direct and indirect manager's emp num, it listed everyone who is under a manager's chain of command in the relationshiop of Direct Report.
Right Now, it is retreving like this:
MgrEmpNum : EmpNum
CEO's : VP's
VP's : AVPs
...
User Profile
Collapse
-
Manager Hierarchy (Recursive)
I am trying to write a stored procedure that could create a table called tblManagerHiera rchy. It is a table that contains recursive data.
The data is coming from tblEmployee where it contains that EmpNum and ManagerEmpNum.
tblEmployee (EmpNum, ManagerEmpNum)
The tblManagerHiera rchy should contain Manager's EmpNum plus direct and indirect subordinates' EmpNum.
Basically it should contain everybody who reports...
No activity results to display
Show More
Leave a comment: