Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SUM function in VFP 8.0 SQL
Message
De
20/03/2004 11:47:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00888077
Message ID:
00888215
Vues:
10
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform