woodlandstx
Technical User
I have the following SQL, it is supposed to make Januarys total add to februarys and show in february, then add februarys field to marchs total and put that in marchs field.
If it is putting them all in order but I am not getting a running total I don't know what I am getting. The numbers are WAY bigger than they are in reality.
EnterYear EnterMonth Running Total
2000 01 4050000
2000 02 33236049
2000 03 214689277
2000 04 179353656
2000 05 139258242
2000 06 448113070
2000 07 365324096
2000 08 446217768
2000 09 303536100
2000 10 539436150
2000 11 636065192
2000 12 485340894
SELECT [11- Monthly Totals Query].EnterYear, [11- Monthly Totals Query].EnterMonth, Sum(YourTableCopy.["EST VALUE"]) AS [Running Total]
FROM [11- Monthly Totals Query] INNER JOIN [11- Monthly Totals Query] AS YourTableCopy ON [11- Monthly Totals Query].EnterYear = YourTableCopy.EnterYear
WHERE ((([11- Monthly Totals Query].EnterMonth)>=[YourTableCopy].[EnterMonth]))
GROUP BY [11- Monthly Totals Query].EnterYear, [11- Monthly Totals Query].EnterMonth
HAVING ((([11- Monthly Totals Query].EnterYear)>"1999"))
ORDER BY [11- Monthly Totals Query].EnterYear, [11- Monthly Totals Query].EnterMonth;
Any help is greatly appreciated~~~
Thanks~!