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 |
|
craigmacca
Posting Yak Master
142 Posts |
Posted - 2012-08-22 : 09:15:04
|
| Hi i need a query that loops through all children in the table below, not sure how i can do this, inside the loop i will be stroing the Id into a temp table which i know how todo, just need help with the recursive loopId ParentId1 02 03 14 35 4 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-08-22 : 09:19:40
|
check out this http://msdn.microsoft.com/en-us/library/ms186243%28v=sql.105%29.aspx KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-22 : 10:44:55
|
| recursive cte should be what you'll be using for this------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|