SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Pls help with a query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Neena_2008
Starting Member

6 Posts

Posted - 12/02/2008 :  05:42:13  Show Profile  Reply with Quote
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?

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 12/02/2008 :  06:12:22  Show Profile  Reply with Quote
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=115500
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000