I have a stored procedure that returns records based on a Department ID:
Employee Name ManagerID SupervisorID ID
John Smith 1 1 1
Tom Jones 1 2 2
Robert Thompson 1 2 3
Jennifer Stevens 1 4 4
I want to indent the records that are returned as follows:
- If ManagerID = ID (no indentation)
- If SupervisorID = ID (2 spaces indented)
- Else (4 spaces indented)*
Something like:
John Smith
Tom Jones
Robert Thompson
Jennifer Stevens
How would I accomplish that?
How about: