S
Starboxes
I want to create a new table with a query that will sum one field entry if 4
field entries all match to generate one entry in the new table from query
(make-table query).
The four fields that need to match are date, site, product, unit and the
field to sum is called adjustment. When I make a query that will group by
the 4 fields that need to match, then sum the adjustment field, i get results
that are multiples of the value i want.
For instance, the original entries may be:
1: Date: B Site: D Product: F Unit: I Amount: 26
2: Date: B Site: D Product: F Unit: I Amount: 569
3: Date: B Site: D Product: F Unit: I Amount: 5631
4: Date: A Site: C Product: E Unit: G Amount: 5463
5: Date: A Site: C Product: E Unit: H Amount: 632
6: Date: B Site: C Product: E Unit: G Amount: 698
The query result is:
1: Date: A Site: C Product: E Unit: G Amount: 27315 (which is 5463
times 5 from entry 4)
2: Date: A Site: C Product: E Unit: H Amount: 3160 (which is 632 times
5 from entry 5)
3: Date: B Site: D Product: F Unit: I Amount: 31130 (which is 6226
times 5 from entry 1, 2, and 3)
4: Date: B Site: C Product: E Unit: G Amount: 3490 (which is 698 times
5 from entry 6)
Am I trying to do something that can't be done?
field entries all match to generate one entry in the new table from query
(make-table query).
The four fields that need to match are date, site, product, unit and the
field to sum is called adjustment. When I make a query that will group by
the 4 fields that need to match, then sum the adjustment field, i get results
that are multiples of the value i want.
For instance, the original entries may be:
1: Date: B Site: D Product: F Unit: I Amount: 26
2: Date: B Site: D Product: F Unit: I Amount: 569
3: Date: B Site: D Product: F Unit: I Amount: 5631
4: Date: A Site: C Product: E Unit: G Amount: 5463
5: Date: A Site: C Product: E Unit: H Amount: 632
6: Date: B Site: C Product: E Unit: G Amount: 698
The query result is:
1: Date: A Site: C Product: E Unit: G Amount: 27315 (which is 5463
times 5 from entry 4)
2: Date: A Site: C Product: E Unit: H Amount: 3160 (which is 632 times
5 from entry 5)
3: Date: B Site: D Product: F Unit: I Amount: 31130 (which is 6226
times 5 from entry 1, 2, and 3)
4: Date: B Site: C Product: E Unit: G Amount: 3490 (which is 698 times
5 from entry 6)
Am I trying to do something that can't be done?