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.
| Author |
Topic |
|
natureman
Starting Member
3 Posts |
Posted - 2006-03-10 : 09:49:02
|
| Hi everyone! I have a question. My data looks like this:name id referer-------------------------Tom 1 0Becky 2 1Jules 3 0Ted 4 2Holmes 5 2Stacy 6 4The id is asssigned to everyone individually, but the referer column is the id of the person that refered them, as you can see this can go infinite levels deep. I want to pull out each levels members and how many people are under them no matter what level they are at. I might be making this more complex than it should be, but it seems like recursion might be on order. This is on a SQL Server 2005 box, fyi.Thanks for any help anyone can offer! |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
|
|
|