I have a table with two columns containing min and max values

minprice INT
maxprice INT

The max price may not be present and is set to zero when that's the case, 
so data might look like:

1 5
5 0
3 10
8 0
6 0

I want to order by the larger of the two column values

ORDER BY Max(minprice, maxprice) DESC

But SQL's MAX() can't be used like this since it's an aggregate function. 
Is there a MySQL function that would do this? 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316742
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to