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 |
|
mindhazed
Starting Member
1 Post |
Posted - 2005-08-29 : 16:57:24
|
| Hey all! Great forum!Here's my problem:http://www.corvettesofhouston.com/used-corvettes-for-sale/?mod=all-corvettesI want Jeep to be listed last. The query that gives the result in order by model (i.e. C5, Jeep, Muscle Cars, etc.) is: SELECT DISTINCT CatID FROM cars ORDER BY year DESCI have a category table called cats that shares the same field CatID and a field called ordernumber (ordernumber is a count in order of how I want the categories).If I want the sections to be listed in order of ordernumber in the cats table, how would I make a query like that?Thank you so much in advance!!-Paul |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-29 : 17:01:50
|
| SELECT DISTINCT c.CatID FROM cars c INNER JOIN category catON c.CatID = cat.CatIDORDER BY cat.ordernumber DESCTara |
 |
|
|
|
|
|