A
Andy
Hello Friends,
Finally I achived Running Sum in Query Table with your guidence. But still
one Problem!!!
Here is my Sql Statement_
SELECT HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo,
Sum(HMADetail.HMAPlaced) AS SumOfHMAPlaced,
DSum("[HMAPlaced]","HMADetail","[HMADetail].[LotNo]&[HMADetail].[SubLotNo]<="
& HMADetail.LotNo & HMADetail.SubLotNo) AS cumulativeHMAPlaced
FROM HMADetail
GROUP BY HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo
ORDER BY HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo;
This Query gives me following_
Date LotNo SubLotNo SumOfHMAPlaced cumulativeHMAPlaced
05/01/2007 1 1 500 500
18/01/2007 1 2 500 1000
18/01/2007 1 3 500 1500
18/01/2007 1 4 500 2000
18/03/2007 1 5 500 2500
18/03/2007 1 6 500 3000
23/03/2007 1 7 500 3500
23/03/2007 1 8 500 4000
27/03/2007 1 9 500 4500
27/03/2007 1 10 500 6500
10/04/2007 2 1 500 5000
10/04/2007 2 2 500 5500
10/04/2007 2 3 500 6000
The Cumulative Sum for SubLot 10 is not correct. I think it is may be
because all nos in lot and SubLots are single digit and sublot 10 is double
digit? if so then how can I change those no with 0 as prefix? ie. 1=01?
(Note: When I change 10 to 9 then all cumuletive su for all records comes
correct)
Andy
Finally I achived Running Sum in Query Table with your guidence. But still
one Problem!!!
Here is my Sql Statement_
SELECT HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo,
Sum(HMADetail.HMAPlaced) AS SumOfHMAPlaced,
DSum("[HMAPlaced]","HMADetail","[HMADetail].[LotNo]&[HMADetail].[SubLotNo]<="
& HMADetail.LotNo & HMADetail.SubLotNo) AS cumulativeHMAPlaced
FROM HMADetail
GROUP BY HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo
ORDER BY HMADetail.Date, HMADetail.LotNo, HMADetail.SubLotNo;
This Query gives me following_
Date LotNo SubLotNo SumOfHMAPlaced cumulativeHMAPlaced
05/01/2007 1 1 500 500
18/01/2007 1 2 500 1000
18/01/2007 1 3 500 1500
18/01/2007 1 4 500 2000
18/03/2007 1 5 500 2500
18/03/2007 1 6 500 3000
23/03/2007 1 7 500 3500
23/03/2007 1 8 500 4000
27/03/2007 1 9 500 4500
27/03/2007 1 10 500 6500
10/04/2007 2 1 500 5000
10/04/2007 2 2 500 5500
10/04/2007 2 3 500 6000
The Cumulative Sum for SubLot 10 is not correct. I think it is may be
because all nos in lot and SubLots are single digit and sublot 10 is double
digit? if so then how can I change those no with 0 as prefix? ie. 1=01?
(Note: When I change 10 to 9 then all cumuletive su for all records comes
correct)
Andy