Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Order by's 1

Status
Not open for further replies.

alexanderthegreat

IS-IT--Management
Sep 9, 2005
70
US
Is it possible to also sort the results of my query by result ASC with the current Price DESC?

SELECT result, BATHS_FULL, BATHS_PART, BDRMS, MLS_NUMBER, PRICE, SCHOOLS_D, SCHOOLS_E, SCHOOLS_H, SQFT, TAX, YEAR_BUILT, ZIP, TOTAL_APT_UNITS, STYLE, CITY, COUNTY, Expr1, Expr2
FROM dbo.v_mult
ORDER BY PRICE DESC
 
Yes,

Just put a comma and then the next field in the order by part.

Ex...

Order By Result ASC, Price DESC

This will sort first by Result and then by price. If you want to sort by price first, then....

Order by Price DESC, Result ASC

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top