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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-12-26 : 10:39:19
|
| Cliff writes "I'm a little confused with the recursive join example. Does it really drill down all the children?Take this tableDocID ParentID Name1 0 A2 1 B3 0 C4 1 D5 4 E6 5 F7 2 GI want to be able to say "Get me all the children of DocID 1"I expect to get "BDGEF"An even greater challenge, I want to do it the other way, "Get me a crumb trail from a given DocID back to the parent.So for "7" I would expect to get "GB" and "6" would give "FEDA"" |
|
|
Peter Dutch
Posting Yak Master
127 Posts |
Posted - 2002-12-27 : 07:05:39
|
| Search Books Online for 'Expanding Hierarchies'They have an example on how to do this |
 |
|
|
|
|
|