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 |
|
senthilaa
Starting Member
12 Posts |
Posted - 2008-01-23 : 04:16:14
|
| Table EMP EMP_ID EMP_NAME1 A2 BTable MgrIDEMP_ID Mgr_ID1 2How to have the following resultEmpName Mgr_NameA B-Senthil |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-23 : 04:26:18
|
| SELECT t1.EMP_NAME AS EmpName ,t2.EMP_NAME AS Mgr_NameFROM EMP t1INNER JOIN MgrID mON m.EMP_ID=t1.EMP_IDINNER JOIN EMP t2ON t2.EMP_ID=m.Mgr_ID |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-23 : 07:12:38
|
| For more levels read about Expanding Hierarchies in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|