Hi, I'm trying to make a 12 months rolling total query. I have a table foe example:
Period Year Total
1 2004 123
2 2004 144
3 2004 1244
.
.
1 2003 111
2 2003 1222
I would like to it have for eample for august:
Sum_of_august Sum_august-12_months
Is there any other way, than each time check in case statement when the period goes under 1 then minus year for one and starts the period from 12 again.
Regards
Pekka
"every dog will have his day
Period Year Total
1 2004 123
2 2004 144
3 2004 1244
.
.
1 2003 111
2 2003 1222
I would like to it have for eample for august:
Sum_of_august Sum_august-12_months
Is there any other way, than each time check in case statement when the period goes under 1 then minus year for one and starts the period from 12 again.
Regards
Pekka
"every dog will have his day