frankiem
Technical User
- Jan 21, 2003
- 11
I am trying to sum sequential records in a table. My data looks like:
[change] [count]
0 0
1 1
1 2
0 2
0 2
1 3
0 3
1 4
The [count] field is initially blank. I set [count] for record 1 to 0. Then, I wrote some SQL code to compute subsequent [count] values by adding the value of [count] in the previous record to the value of [change] in the current record.
This code works by taking 2 copies of the table and mapping the recordnumber key, [tbl].[ID] to [tbl_1].[ID+1]. However, this code only works intermittently and I don't understand why - I think ACCESS might be slicing the job up into bits and parallel-processing them.
Does anybody know what causes this problem - and, more to the point, how can I fix it?
FrankieM
[change] [count]
0 0
1 1
1 2
0 2
0 2
1 3
0 3
1 4
The [count] field is initially blank. I set [count] for record 1 to 0. Then, I wrote some SQL code to compute subsequent [count] values by adding the value of [count] in the previous record to the value of [change] in the current record.
This code works by taking 2 copies of the table and mapping the recordnumber key, [tbl].[ID] to [tbl_1].[ID+1]. However, this code only works intermittently and I don't understand why - I think ACCESS might be slicing the job up into bits and parallel-processing them.
Does anybody know what causes this problem - and, more to the point, how can I fix it?
FrankieM