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.