| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Building a tree from individual file paths in T-SQL|
Usually I'm the one answering database questions, but I'm completely stumped here. Looking for some T-SQL code to get the results I need.
I have a table that contains a couple of file paths, lets say the table is called FOLDERS and the field name is FOLDER. Some results would be:
Basically what I need to do is figure out how to select these in such a way that I can build a collapsible folder tree in an application. So my results would need to be something like:
Anyone have any ideas? I know I could do this using a temp table and a cursor, but I'm wondering if there is a more efficient way first.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved