N
NetworkTrade
Table1 (currently populated data)
ID Ref Quant
1 A 500
2 A 350
3 A 400
4 B 550
5 B 600
6 C 200
Column Ref changes randomly. Values in Quant are random. This is the end
result desired:
ID Ref Quant SeriesStart SeriesEnd
1 A 500 1 500
2 A 350 501 850
3 A 400 851 1250
4 B 550 1 550
5 B 600 551 1150
6 C 200 1 200
The SeriesStart resets to 1 when Ref changes mode. SeriesStart othewise is
+1 of the prior SeriesEnd. SeriesEnd value relative to Quant is just a
running sum, until Ref change mode causes a reset.
I had not thought a query calc would be viable so was approaching the table
like an array and was going to vb code the solution - which isn't that much
of a biggie I don't think. It was the LookUp and InsertInto commands to get
values in/out of the table that I'm not so sure about......
would welcome advice on this
ID Ref Quant
1 A 500
2 A 350
3 A 400
4 B 550
5 B 600
6 C 200
Column Ref changes randomly. Values in Quant are random. This is the end
result desired:
ID Ref Quant SeriesStart SeriesEnd
1 A 500 1 500
2 A 350 501 850
3 A 400 851 1250
4 B 550 1 550
5 B 600 551 1150
6 C 200 1 200
The SeriesStart resets to 1 when Ref changes mode. SeriesStart othewise is
+1 of the prior SeriesEnd. SeriesEnd value relative to Quant is just a
running sum, until Ref change mode causes a reset.
I had not thought a query calc would be viable so was approaching the table
like an array and was going to vb code the solution - which isn't that much
of a biggie I don't think. It was the LookUp and InsertInto commands to get
values in/out of the table that I'm not so sure about......
would welcome advice on this