>Why do I get the error message, "sum.prg does not exist"? This didn't happen in rpeviopus version s of VFP, but I do understand that some SQL code has been tightened up. So, what do I use if not SUM()?
>
>
>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
>
Cecil,
I think it existed in all versions. There is a sum() in your where clause. Try using a having clause instead :
WHERE ;
APTRXFIL.VOUCHER_NO = APTRXDST.VOUCHER_NO ;
having APTRXFIL.INV_AMT <> SUM(APTRXDST.DST_AMT) ;
Cetin