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
 Transact-SQL (2000)
 Parent/Child Table - Unary Relationship

Author  Topic 

kleinmi
Starting Member

9 Posts

Posted - 2003-05-20 : 10:13:01
Hey Guys,

How would you recomend returning a tree view from a table with a unary relationship?

Ex fields:

Name (folder or file name)
GUID
ParentGUID
Type (folder or file)



I want to print out like so:

Top folder
File
File
Sub Folder
File
Sub Folder
etc

I'm sure this is a typical situation, how have you guys solved something like this in the past?


Any help would be great!




Edited by - kleinmi on 05/20/2003 10:14:01

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-05-20 : 10:34:41
Have a look at the page in Books Online called "Expanding Hierarchies".

Jay White
{0}
Go to Top of Page
   

- Advertisement -