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 |
|
deepak_sivaraman
Starting Member
1 Post |
Posted - 2004-02-17 : 23:29:44
|
| Hi,I have a table which has two columns Brandid and Parentid.If a particular brand has a Parent Brand then the ParentId is persent else it is null.Now i have a BrandId and need to find all its child brands and then the child brands of the first level brands.Something like this1--2---3----4Right now we r using cursors to do this but it is kind of slow so is there any other way to optimize it.RegardsDeepak |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-02-18 : 06:11:14
|
| Seehttp://www.nigelrivett.net/RetrieveTreeHierarchy.htmlAlso a search on this sight for trees or hierarchies should turn up lots of suggestions.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|