DataTamer: SQL Server Services

Management Trees

The following code prepares a sample table of staff then extracts a management tree starting from the senior employee.

Your result set should be a clean indented management tree such as the one below:

CEO
 VP Marketing
  Tactical Marketing Director
  Strategic Marketing Director
 VP Operations
  Operations Director
 VP Sales
  Tactical Sales Director
  Strategic Sales Director