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 |
|
sparrow37
Posting Yak Master
148 Posts |
Posted - 2010-12-01 : 02:10:07
|
| Hi All:I have table with id, name, parentid. I want to create a stored procedure/ sql to which i pass the id and it returns all the child recordids, and name related to this id( i guess its parent id).Regards,Asif Hameed |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
|
|
sparrow37
Posting Yak Master
148 Posts |
Posted - 2010-12-01 : 03:25:56
|
| Hi Vaibhav:Can i do it without CTE? Regards,Asif Hameed |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-12-01 : 12:28:42
|
| you can, but you need a loop to loop through levels each time. Why do you want to avoid CTEs? Are you in 2000 or below?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|