I have a table with the following fields: planned_volume, actual_volume and monthdate.
I need to come up with a query that will sum the volumes based on monthdate, like:
(fieldname)1/1/2007 - If monthdate = 1/1/2007 then SUM "planned_volume" where "monthdate" betweeen 1/1/2007 And 12/1/2007.
2/1/2007 - If monthdate = 2/1/2007 then SUM "actual_volume" where "monthdate" = 1/1/2007 and then SUM "planned_volume" where "monthdate" between 2/1/2007 And 12/1/2007 and end up with one combined total.
Continue on this path through 12/1/2007.
Is a Select Case function a possible solution to this or is it something that I can do in the query grid?
Thanks for any help.
Toni
I need to come up with a query that will sum the volumes based on monthdate, like:
(fieldname)1/1/2007 - If monthdate = 1/1/2007 then SUM "planned_volume" where "monthdate" betweeen 1/1/2007 And 12/1/2007.
2/1/2007 - If monthdate = 2/1/2007 then SUM "actual_volume" where "monthdate" = 1/1/2007 and then SUM "planned_volume" where "monthdate" between 2/1/2007 And 12/1/2007 and end up with one combined total.
Continue on this path through 12/1/2007.
Is a Select Case function a possible solution to this or is it something that I can do in the query grid?
Thanks for any help.
Toni