Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PFunk
Starting Member
2 Posts |
Posted - 2005-12-21 : 17:46:53
|
| I have a table of categories and sub-categories like so:CategoryID (PK)ParentCategoryIDCategoryOrderHow do I select from the table so that the order of data is a main category followed by all its subcategories, then the next main category followed by its subcategories?Cheers.:) |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
PFunk
Starting Member
2 Posts |
Posted - 2005-12-22 : 16:57:03
|
| Thanks madhivanan.Is there a way to do it using my existing structure?CategoryID (PK) (varchar(100))ParentCategoryID (varchar(100))CategoryOrder (int)Cheers. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-23 : 00:40:12
|
| Try to simulate the logic used at that linkMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|