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)
 Tree Display

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-25 : 09:29:43
tom writes "Here are my tables...
Child Parent
==== =====
1 0
2 1
3 1
4 1
5 1
6 0
7 6
8 6
9 6
10 6



Category table
===========

cat_id desc
------- -----
1 A
2 a.1
3 a.2
4 a.3
5 a.4
6 B
7 b.1
8 b.2
9 b.3
10 b.4

The above structure shows my table layout. I hope it is right.
How do display tree structure similar to directory web site (yahoo.com)
A
a.1, a.2, a.3
B
b.1,b.2,b.3

where each main category there are 3 sub categories.
Thank you."
   

- Advertisement -