I'm stumped by something that I was almost certain that I've done fairly easily in the past...
I have a simple table of categories like this:
ID int (identity)
SubCategoryOf int (nullable)
Where each row is a category, and possibly a subcategory of another category. What I want to do is display this data something like this.
Any suggestions for the select code which could accomplish this? I could limit the number of levels available, but this isn't ideal. If it helps, this will be for use in a drop down list with ASP.Net (I'll be using the ID of each category when selected).
Thanks in advance.