Kbase P87739: ACCUMULATE for array fields returns unexpected results.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/07/2004 |
|
Status: Unverified
SYMPTOM(s):
ACCUMULATE for array fields returns unexpected results.
Aggregates work on all elemements for all records.
ACCUMULATE statement and ACCUM function occur within a loop referencing the indiviual elements of the array field.
CAUSE:
This is expected behavior.
As a result of the loop, there are multiple aggregates for the same field which can lead to unexpected results.
Note that the multiple elements of the array fields are not seperate fields.
FIX:
Avoid placing the aggregates into a loop.
For the ACCUMULATE statement, this can be done simply by referencing the entire array field instead of referencing the elements individually.
For the ACCUM function, the different element references have to be hardcoded.