Need help in recursive query | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Need help in recursive query

Hi…I wanted a help on recursive query in SQL SERVER 2000….The sample Dbase is below…can any1 plz suggest me a solution…Thx MGR_ID EMP_ID EMP_NAME
NULL 1 BIG BOSS
1 2 LACKEY
1 3 LIL BOSS
1 4 BOOTLICKER
2 5 GRUNT
3 6 TEAM LEAD
6 7 LOW MAN
6 8 SCRUB I want a recursive query wch gives the hierarchy on any point…
Search this site or google on "trees and hierarchies". —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs

Refer this
http://www.nigelrivett.net/RetrieveTreeHierarchy.html Madhivanan Failing to plan is Planning to fail
]]>