March 29th, 2000, 11:31 PM
I would like to use the Sum function for a page which shows orders in the database.
I use the following:
"Select Location, (Sum)OrderTotal from Orders Group by Location"
and get a very long string of numbers. The same phrasing works with Count but not with AVG or Sum.
The OrderTotal field is decimal type.
Does anyone know why this isn't working or have suggestions about getting a total?
March 30th, 2000, 04:48 AM
The Syntax is wrong, Sum should not be in brackets (I dont know if you meant to do this). The syntax should be:
Select Sum(Order) instead.
Apart from that - it should work fine.
Make sure the column you are summing,
is a number type.