Hello,
I have a situation which I've not encountered before since I'm fairly new to SQL. I have a table that contains every single user within a building. Each user has a supervisor ID # that indicates who they report to. Since I have their ID # I would like to re-query the same table and get their name. How can I do this?
Table Data:
Expected Results:
I'm not too concerned with users not having a supervisor ID #. Thanks for any help
I have a situation which I've not encountered before since I'm fairly new to SQL. I have a table that contains every single user within a building. Each user has a supervisor ID # that indicates who they report to. Since I have their ID # I would like to re-query the same table and get their name. How can I do this?
Table Data:
Code:
ID Name SupervisorID
12345 Susie Tester 98751
54321 Iam Testy
54654 Tom McTest
46546 Sammy Sample 54654
98751 Mark Debug
65465 Super Shopper 12345
Expected Results:
Code:
ID Name Supervisor
12345 Susie Tester Mark Debug
54321 Iam Testy
54654 Tom McTest
46546 Sammy Sample Tom McTest
98751 Mark Debug
65465 Super Shopper Susie Tester
I'm not too concerned with users not having a supervisor ID #. Thanks for any help