This one seems so simple but I cannot figure it out.
I have data stored like this...
ManagerID EmployeeID MangerName
0 0 Debbie
1 0 Mark
2 2 Chris
3 2 Leo
4 1 Mar
5 2 Steve
6 2 Mar
I want this output to look like
EmployeeID Manager1 Manager2 Manager3 Manager4
0 Debbie Mark Null Null
1 Mar Null Null Null
2 Chris Leo Steve Mar
I know there can only be four entries so four managers. I know I need to use self joins...but i keep getting back sever rows that look like
0 Debbie Mark Mark Debbie
0 Debbie Debbie Mark Debbie etc.
please help