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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Recursive problems

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-04 : 07:39:55
Doug writes "I have a table that holds several different categories, each parent category has a child category and a grand child category. I am attempting to output all the differnet categories with their respective childs beneath them. So say automobiles would have Cars & Trucks, Boats, ATV etc below the parent of automobiles. This is SQL2k on windows 2000 adv server SP4

IE:

[cat_id] [category] [parent_id]
1 Automobile NULL
2 Antiques NULL
3 Art NULL
4 Cars & trucks 1
5 Boats 1
6 Chevy 4
7 Camaro 6
8 Asian Antiques 2
9 Asian ant pots 8
"

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-10-04 : 08:59:33
http://www.nigelrivett.net/RetrieveTreeHierarchy.html

Chirag
Go to Top of Page
   

- Advertisement -