I have a table of employees with fields of employeeid, managerid. Each user has a manager and each manager has a manager to a number of levels, so:employeeid, managerid with content:1, 52, 53, 74, 8,5, 106, 5etc and going on for an unknown number of manager levels. I need to get out a Manager of any level who can have employees/managers beneath him who if managers, have their own employees under them. All levels need to be returned.Can anyone help with the best way to do this?Any help gratefully rec'd.

Hi, Many thanks for the pointer. I found the examples there hard work to follow and found the ones here are a more basic and easier to follow set of details: http://www.4guysfromrolla.com/webtech/071906-1.shtml I will try the below on the db at work and confirm if it does the job:WITH EmployeeHierarchy (EmployeeID, LastName, FirstName, ManagerID, HierarchyLevel) AS( -- Base case SELECT EmployeeID, LastName, FirstName, ManagerID, 1 as HierarchyLevel FROM myEmployees WHERE employeeid=285--ManagerID IS NULL (Replaced to enter ID of Manager that wants to run the report.)