Thank you.
Table example
IDParentIDSortOrderCaption
1null1Main
211Files
313Folders
422File2
512Holders
621File1
752Holder2
851Holder1
Required result example
Main
-Files
--File1
--File2
-Holders
--Holder1
--Holder2
-FoldersI don't think a simple order by statment can do this job. You may need to develop a stack algorithm and a cursor to loop through records.|||Check this article. That's your answer
www.aspalliance.com/388
AP|||Thank you! I also got some good responses from the sqlteam.com forum at http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=33222
No comments:
Post a Comment