View Full Version : Sum in Query


Lady Gragor
02-16-2010, 04:15 PM
Hi,

I've done this a thousand time but must be missing something here. I have just changed to 2007, trying to find the value of the sum of one field in a query.

SQL is as follows:-

Sum(tbl_Variations.[Approved Variations]) AS Total
FROM tbl_Variations

The result is the individual amounts, not the sum of the amounts. A running sum would be good.

Could somebody help me out please?

Thanks

namliam
02-17-2010, 12:36 AM
This is not your full sql, your atleast missing the SELECT part of it

More over if you are getting single values you are bound to have a group by too, this should only return one total.

SQL hasnt changed in 2007 comparing to other versions.

ibmfreak
02-17-2010, 05:47 AM
That is because of your Grouping. Look out for group under the QBE