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
 General SQL Server Forums
 New to SQL Server Programming
 help with query?

Author  Topic 

roxcy
Yak Posting Veteran

58 Posts

Posted - 2007-11-08 : 01:56:11
Hi,
Please help me with this query.Following is my table structure.Table Name is Menu

MenuId Text Desc ParentId
1 Product List of Products null
2 Applications Applications null
3 Background ProductBackground 1
4 Details Product Details 1
5 Mob Device Mob Device 2
6 Poratl Portal Appl 2

I would like to display menu only for product and its parent id
ie Product>>Background
>>Details.
Please help me with an appropriate solution..

Thanks..

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-11-08 : 02:28:06
see http://mindsdoor.net/SQLTsql/RetrieveTreeHierarchy.html


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-11-08 : 03:13:37
Or why not use the new recursive cte approach described in SQL Server 2005 Books Online?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -