Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
Query field to get 1 years worth of totals - show total... - 3/22/2007 12:10:44
Need to know how to sum the data of one field, many records, for a particular year.
I've got a Yearly Totals field that I want to show all the sum of the current years data from another Totals field. Same Table and everything...
I also have a field that called Last years total that I would like to show the sum of all of last years data...
And when the year changes, I'd like those fields to dynamically change. So I don't want to put in a date range thing of 1/1/2007 to 12/31/2007 type thing. I want to do something like Current year minus 1 (for last years data) and Current Year for this years data.
This may require a cool SQL query...so if anyone is a sql query master...chime in.