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 |
|
Sutty45
Starting Member
1 Post |
Posted - 2005-11-21 : 06:41:55
|
| I currently have a category table in sql server which has basically three columns. and look similar to this.Cat_ID, Parent_ID, Cat_Name1,,Category12,1,Category23,1,Category34,2,Category45,3,Category56,3,Category67,5,Category7I need to be able to get all the children Cat_ID from a given Cat_ID. But as well as its direct children, I want to know there children. So for example if i enter cat_id 3 i'd get 5,6 and 7. Is it possible to do this with tsql or do i require aditional programmig logic?Any help would be greatly accepted. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-11-21 : 06:51:24
|
| Search here for hierarchies...there's a sticky post from Kristen in the "new to SQL" section which will give you a good link. |
 |
|
|
|
|
|
|
|