summation in access database

G

Guest

Intend to sum a series of values for each day of a particular month.
This is the query that didn’t work. The result just gave a list of the data.

SELECT [AWY003~1].Date, [AWY003~1].Time, Sum([AWY003~1].head) AS SumOfhead
FROM [AWY003~1]
GROUP BY [AWY003~1].Date, [AWY003~1].Time;

Based on a user response, the following query was able to provide a
summation of values for each day of a particular month.

PARAMETERS [What month?] Byte;
SELECT date AS Expr1, Sum([AWY003~1].head) AS Total
FROM [AWY003~1]
WHERE (((Month([date]))=[What month?]))
GROUP BY date;

How can this query be expanded to sum values for each day of the year?
 
T

tina

a time value, in a date/time field is precise - to the second. so unless the
"times" in your database are predetermined defaults, grouping on time will
simply list the individual records. try removing the time field from your
query (in the 2nd example SQL you posted, you'll notice that the time field
is *not* included).

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top