SUM function in Query :: Newbie

gti_jobert

Registered User.
Local time
Today, 23:23
Joined
Apr 4, 2006
Messages
11
Hi all,

Another quick Q - am a newbie at Access!

I am performing the following query:
Code:
.Open "SELECT DISTINCT([Date]), SUM([Batch Qty]) As [Batch] FROM [" & TableName & "] " & _
            "WHERE [Date] BETWEEN #" & sDate & "# AND #" & eDate & "# " & _
            "GROUP BY [Date], [Batch Qty]", cn, , , adCmdText

Data Produced:

29/03/2006 10
29/03/2006 20
29/03/2006 100
30/03/2006 60
30/03/2006 80
30/03/2006 5
30/03/2006 5

How do I Sum the Totals for the Dates? So it produces:

29/03/2006 130
30/03/2006 150

TIA
 

Users who are viewing this thread

Back
Top Bottom