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 |
|
juliano.net
Starting Member
10 Posts |
Posted - 2006-04-30 : 23:30:34
|
| How can I create a function that returns hierarchical data from a table with this structure:- CategoryID- CategoryName- CategoryFatherI want to bring the result set like this...CategoryID | CategoryName | CategoryFather | HierarchicalLevel 1 | Video | 0 | 0 2 | DivX | 1 | 1 3 | WMV | 1 | 1 4 | Programming | 0 | 0 5 | Web | 4 | 1 6 | ASP.Net | 5 | 2 7 | ColdFusion | 5 | 2How can I do this? Does anybody has a sample code? I need this on SQL Server 2000 and if it's possible (but not too necessary) in SQL Server 2005.Thanks.[]'sJuliano.Net Developer |
|
|
darinh
Yak Posting Veteran
58 Posts |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
sshelper
Posting Yak Master
216 Posts |
|
|
|
|
|