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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Retrieve user hierarchy...

Author  Topic 

Sanatan
Starting Member

19 Posts

Posted - 2010-04-22 : 07:20:55
I have a user table as below.

UserID ManagerID Title
aaaa eeee user1
bbbb eeee user2
eeee gggg Manager1
gggg pppp Manager2
pppp null CEO

Is there a way to retirve the entire hierarchy of users under 'pppp'?

Thanks

karthik_padbanaban
Constraint Violating Yak Guru

263 Posts

Posted - 2010-04-22 : 07:31:19
http://karthik4identity.blogspot.com/2010/01/recursive-queries-replacement-to.html

Karthik
http://karthik4identity.blogspot.com/
Go to Top of Page
   

- Advertisement -