I have 2 similar files. One is a running total. One is a daily total. Each evening, I want to update the running total with data from the daily total. For example (the column headings aren't actually on the file):
Daily Total
Name Apples Oranges Bananas
Joe Smith 1 1 2
John Smith 1 0 2
Michelle Smith 0 2 0
Joe Smith 1 1 2
John Smith 1 0 2
Michelle Smith 0 2 0
Running Total
Name Apples Oranges Bananas
Joe Smith 10 10 10
John Smith 5 5 0
If there are any matcing records between the 2 files, Joe and John Smith for example, I want to combine the total's together (leaving one record on the Running Totals file). If any record is present on the Daily Total file, but not on the Running Total file, I want to add it to the Running Total file. Sample output would be:
updated Running Total
Name Apples Oranges Bananas
Joe Smith 11 11 12
John Smith 6 5 0
Michelle Smith 0 2 0
Joe Smith 11 11 12
John Smith 6 5 0
Michelle Smith 0 2 0
Is this possible? Would it be a SORT statement utilizing SUM FIELDS?
Thanks