Are you looking for help on the db part or constructing the UI display or both?
When it comes to the DB part, I listen to Joe Celko. That dude knows way more about databases and SQL than any person ought to. Here's an article of his on messing with hierarchical data in SQL: http://onlamp.com/pub/a/onlamp/2004/08/05/hierarchical_sql.html I know that SQL Server 2008 added in a new datatype for working with hierarchical data. It's called HierarchyID but I've never used it. Here's an MSDN article on using it: http://msdn.microsoft.com/en-us/magazine/cc794278.aspx and what seems to be a slightly more readable blog post about it: http://blogs.msdn.com/b/manisblog/archive/2007/08/17/sql-server-2008-hierarchyid.aspx As for the UI creation, sounds like a case for either recursive function calls or else dynamic loops, depending on whether the data you bring out of the db is presorted or not. Judah On Mon, Mar 14, 2011 at 3:56 PM, LRS Scout <lrssc...@gmail.com> wrote: > > I have a table departments with the fields departmentID, parentDepartmentID, > departmentName. > > I'm trying to build a nested ul li structure out of this. Currently this > can be nested n deep. > > I'm not sure how best to even approach this. SQL Server 2008. > > god this sounds dumb even to me. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343013 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm