How to calculate closing for every month in sql urgent
Dear all
I have Sql Script Question I have following query will display closing balance of april 2013 , Now I want to build query for
every month ( April 13 1322751 , may 124545 ....)
Select PROD_CODE,a.INVDATE,sum(a.BalanceQty) as Qty
FROM FACT_MonthlyInventory a
WHERE a.invdate <='01-Apr-2012'
group by a.PROD_CODE,a.INVDATE
PROD_CODE
INVDATE
Qty
1CY4
2012-04-01 00:00:00.000
1322751
How to achieve the same in sql , any SQl Expert Comments Pls.
thanks in adv.
Vikas
Hope this resolve your issue. If the issue is solved please mark the answer with Accept as Solution & like it. If you want to go quickly, go alone. If you want to go far, go together.