|
access 2003 addquery counts deleted records
Every week I receive two queries which I import in access so i can put them together, do some filtering, counting, aggregating etc.
Because the imported tables have some relationships i chose to import into an existing table instead of creating a new one each time. Before I do this I remove all data.
However, when I ran an addquery, the sum of a field is much higher then when I add up all records myself. I thought I made a mistake so I deleted all data and imported the result again to have a fres set. When I ran the query again, the sum was even higher. Instead of calculating the sum i chose group by. Then I get to see the expected records. When I do sum again. The result is too high.
It appears as if the deleted records are still taken into account when I aggregate to a sum or count. Does anyone have some experience with this? I'd like to know what is happening an more than that, how to fix it?
__________________
|