Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Pls help
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

6 Posts

Posted - 12/02/2008 :  05:47:12  Show Profile  Reply with Quote
I am using SQL Server 2000
I hav a table like this

-----Table 1 :--------

MangerID EmpID
15 18
15 10
18 60
18 3084
60 78
60 57

A manager can be a supervisor as well as employee at the same time.I want to create a hierarchy report with the top level manager at the top & subordinates at the bottom.
I want a result like this :

Supervisor Sub1 Sub2 Sub3
15 18 3084 null
15 18 60 78
15 18 60 57
15 10 null null

Can any1 help me with a query?

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/02/2008 :  05:58:43  Show Profile  Reply with Quote
see this
Go to Top of Page

Patron Saint of Lost Yaks

30421 Posts

Posted - 12/02/2008 :  06:37:32  Show Profile  Visit SwePeso's Homepage  Reply with Quote

E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000