VOUCHER # INV_AMT DST_AMT 76171 606.20 606.20 76172 301.87 501.87 76173 667.75 675.50 77093 706.14 706.14I don't understand why the 1st and 4th records appear in the results. Does anyone understand why this happens based on the following code?
SELECT ; APTRXFIL.VOUCHER_NO, ; APTRXFIL.INV_AMT, ; SUM(APTRXDST.DST_AMT) AS DST_AMT ; FROM ; APTRXFIL, ; APTRXDST ; WHERE ; APTRXFIL.VOUCHER_NO = APTRXDST.VOUCHER_NO AND; APTRXFIL.INV_AMT <> SUM(APTRXDST.DST_AMT) ; GROUP BY ; APTRXFIL.VOUCHER_NO, ; APTRXFIL.INV_AMT ; INTO CURSOR tmpAPTransactions