View Single Post
 
Old April 1st, 2004, 07:39 PM
Steven Steven is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Without any further information.........
Something along the lines of:
Code:
SELECT DatePart("yyyy", [YourDateField]), Sum([YourMoneyField]) 
FROM YourTable 
GROUP BY DatePart("yyyy", [YourDateField])
would give you the yearly totals.

Something like:
Code:
SELECT DatePart("yyyy", [YourDateField]), DatePart("m", [YourDateField]), Sum([YourMoneyField]) 
FROM YourTable 
GROUP BY DatePart("yyyy", [YourDateField]), DatePart("m", [YourDateField])
would give you the totals for each month

a little more info on where you'd like this shown (Form/Report/Query etc), would probably be helpful

I am a loud man with a very large hat. This means I am in charge