This probably has to do with the data type of the field that you're working
with. For instance, if price is a text field because you're storing $123.43
instead of a numeric field and just storing 123.43 it would sort
alphabetically instead of numerically. You could probably convert the field
value to a numeric value in your first query using CAST or INT and that
would return it as numeric. Then your sort should work. It's been a while
since I've done that, but I think it would work.
John Burns
-----Original Message-----
From: Brad Roberts [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 12:38 PM
To: CF-Talk
Subject: Ordering a QofQ
I'm building a query dynamically, and then trying to sort it on a numeric
column, but it only wants to sort alphabetically. Anyone experience this,
or know what I need to do to sort numerically?
<cfquery name="qResults" dbtype="query">
select * from qResults order by hasPhoto DESC, price DESC
</cfquery>
-Brad
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Ordering a QofQ Brad Roberts
- John Burns