Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Modeling help (recursive lookup)
Message
 
 
To
21/02/2007 15:57:38
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01197755
Message ID:
01197764
Views:
19
This message has been marked as the solution to the initial question of the thread.
>I am trying to work out a situation in my head...
>
>I have 2 tables - A User table with UserID and UserName, and a UserSupervisor table with UserSupervisorID, UserID, SupervisorID.
>
>A user can have multiple supervisors, and a supervisor can have a supervisor. What I want to do is for a particular user, get all users above them. I know I am going to have to do a recursive lookup somehow. Is this something I need to do in a SPROC?

Do you need to re-invent the wheel?

http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=9

or http://www.mssqltips.com/tip.asp?tip=938

or all other google results <g>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform