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 - 2006-12-06 : 07:45:46
|
Dave writes "Your answer for a Recursive SQL seems lacking an important part. The answer. (That's an answer?)I think you are officially STUMPED.First answer was at: http://4guysfromrolla.com/webtech/sqlguru/q120899-1.shtml by Michael S., Then Kurt wanted a little more...http://www.4guysfromrolla.com/webtech/sqlguru/q121799-1.shtmlThen Scott (the webmaster) says that he did it back in 99.Scott maybe you can show Sean, then Sean can create an answer to the question of: PostID ParentID{HINT: The answer is looping a Select TOP 1 with JOIN PostID=ParentID - with a NOT IN (from the previous result set).Just put the results in a temp table. Oh, and if you want to pick an choose a small subsegment of the tree - just pass a var to it for the starting PostID - that way you'll only pick off the subsegment of related data that you want.}Works for me. But what do I know.DaveNot really a programmer/AnalystJust do a little coding for myselfDon't work for anybody and I don't have anything to plug.(cunfusion says: Self-praise is no recommendation)" |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-06 : 07:51:08
|
Is there something you want to ask?Peter LarssonHelsingborg, Sweden |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|