Hi there
I have a table that look like this it contains user names
User
+--------------
Paul
Dan
Peter
Simon
John
Each user can be a manager of a different user. I have written a query that shows who manages who
User Manager
+--------------+--------
Paul Dan
Dan Peter
Peter John
Simon Peter
John John
Is it possible to create a SQL statement that will show a list of managers that can manage a user. A list of user above the requested user.
For example if i used "Paul" as a parameter then i would get a list like this
User
+--------------
Dan
Peter
John
Any help would be much appreciated.
Thanks Rohan
I have a table that look like this it contains user names
User
+--------------
Paul
Dan
Peter
Simon
John
Each user can be a manager of a different user. I have written a query that shows who manages who
User Manager
+--------------+--------
Paul Dan
Dan Peter
Peter John
Simon Peter
John John
Is it possible to create a SQL statement that will show a list of managers that can manage a user. A list of user above the requested user.
For example if i used "Paul" as a parameter then i would get a list like this
User
+--------------
Dan
Peter
John
Any help would be much appreciated.
Thanks Rohan