Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-09-03 : 08:24:36
|
| ibadathulla writes "I got a single table where in it contains three fields the table Employee look like thisid Empname managerid--------------------------------------1 aaa 22 bbb 33 ccc 44 ddd 1--------------------------------------the resultant output should be like this when i write a single query for the above table using inner join(self join)Empname managername--------------------------------------aaa bbbbbb cccccc dddddd aaa" |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2004-09-03 : 08:30:39
|
| Try something likeSELECT a.empname, b.managername from yourtable a inner join yourtable b on a.managerid = b.id-------Moo. :) |
 |
|
|
|
|
|