I have 2 tables with multiple records per employee. I am trying to read each table separately to sum specific records in each table. The sum of the values in 1 table will be added to gross wage and the sum of the values selected in the other table will be subtracted from gross wage.
Table 1
0001 90.76
0015 19.76
should give me $110.52
Table 2
0012 13.52
0013 1.53
should give me $15.05
What appears to happen is when the records are read from table 2 the last value from table 1 is added again so the table 1 sum ends up being 4 or 5 times more than it should be.
Table 1
0001 90.76
0015 19.76
should give me $110.52
Table 2
0012 13.52
0013 1.53
should give me $15.05
What appears to happen is when the records are read from table 2 the last value from table 1 is added again so the table 1 sum ends up being 4 or 5 times more than it should be.