Query for Listing top level data in employee hierarchy

Posted by Rajendra.prasad under Sql Server on 4/6/2011 | Points: 10 | Views : 2979 | Status : [Member] | Replies : 1
Hi All,
Suppose employee table consists fields like empno, empname, designation, reportingid {which consists of empno whom he is reporting}.

if this table contains employees of team member, team lead, project mngr, group lead, m.d.

i need a query which populates the data when a team member id is given as input. the result should be team member name, empno, reportingid, reportingname, again reporting reportingid, name and his reporting id,name etc...

eg:-

Team Member Name, Team Member No, his reporting name & no, again his reporting name & no, again his reporting name & no, etc.

Regards,
Rajendra Prasad




Responses

Posted by: Karthikanbarasan on: 4/11/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Check this link

http://forums.systeminetwork.com/isnetforums/archive/index.php/t-51435.html

Thanks
Karthik
www.f5Debug.net

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response