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 |
|
rlull
Starting Member
39 Posts |
Posted - 2007-07-16 : 13:00:45
|
| I have the following table called Categories which contains the following rows:CatId, ParentId, CatNamewith the following data:1, 0, Articles2, 0, Forms3, 0, Videos4, 1, ArticleSubCategory15, 1, ArticleSubCategory25, 4, ArticleSubSubCategory16, 2, FormSubCategory17, 2, FormSubCategory2etc...I would like to create a cascading menu with a single select statement so that the list would look like the following:Articles ArticleSubCategory1 ArticleSubSubCategory1 ArticleSubCategory2Forms FormSubCategory1 FormSubCategory2Is this possible with a single select statement? Thanks. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-16 : 14:06:02
|
| There is an knowledgebase on Microsoft's site about Expanding Hierarchieshttp://support.microsoft.com/kb/248915http://msdn2.microsoft.com/en-US/library/aa172799(SQL.80).aspxPeter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|
|
|