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 |
|
cakewalkr7
Starting Member
11 Posts |
Posted - 2005-09-13 : 16:25:40
|
| I've got a category table with a categoryid field and a parentcategoryid field. The parentcategoryid field is just the categoryid of another row. So, I'm looking to create a navigation bar at the top of a page like so...Home>Store>Wildlife>Fish... Wildlife would have a categoryid of say 5 and Fish has it's own categoryid of 12, but a parentcategory of 5. I know that through a couple of queries I can backtrack and get all the ids and create my navigation, but I didn't know if there's a more efficient way in sql to get these ids in a certain order? Anyone have any ideas? Thanks. |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2005-09-13 : 16:54:34
|
| Hi there. Welcome to the forums. This topic has been well documented here at sqlteam.Check out these links and please dont hesitate to repost here if you run into any trouble:http://www.sqlteam.com/item.asp?ItemID=8866http://www.seventhnight.com/treestructs.aspNathan Skerl |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
cakewalkr7
Starting Member
11 Posts |
Posted - 2005-09-14 : 08:17:42
|
| Thanks everyone. That's exactly what I was looking for. And, it's nice to receive a welcome rather than a flame due to bringing up a past discussion topic. Much appreciated! |
 |
|
|
|
|
|