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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to get write Parent child relation type query

Author  Topic 

ranjeetsingh_6
Posting Yak Master

125 Posts

Posted - 2011-01-07 : 06:14:48
I have a table like below and want output as mention below

Table:

id name Manager
5 C 6
1 A 6
6 F 2
4 D 5
2 B null



output

Name manager
C F
A F
F B
D C
B null


Ranjeet Kumar Singh

malpashaa
Constraint Violating Yak Guru

264 Posts

Posted - 2011-01-07 : 06:40:39
Duplicate of thread [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=154932[/url]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-08 : 01:14:11
see
http://msdn.microsoft.com/en-us/library/ms186243.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -