Forums

ASP

This topic is locked

Will not order by number!

Posted 21 Mar 2006 15:48:02
1
has voted
21 Mar 2006 15:48:02 Simon Bloodworth posted:
have a recordset which takes records in database, adds 3 columns together and then i can display the result fine. My problem is when i try and order by the added amount it doesnt work, its like it doesnt see it as a number - it is set as currency in the DB (access) but it just wont work!!

Sample of what i have done:

SELECT SUM(LocalRevenue+ NationalRevenue+ IntlRevenue) AS 'SpendTotal', Site_Name
FROM [all_customer _work]
GROUP BY Site_Name
ORDER BY 'SpendTotal' DESC


i get a result but it doesnt order the data by 'SpendTotal'.

If anyone can help it would be greatly appreciated

Simon

DWMX 2004 | ASP | VBScript

Replies

Replied 25 Apr 2006 18:29:59
25 Apr 2006 18:29:59 Erik Piisila replied:
try taking the single quotes off in the order by statement

Reply to this topic