Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Summing up data with null values
Message
De
01/05/2005 13:27:07
 
 
À
01/05/2005 12:42:17
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01010013
Message ID:
01010020
Vues:
27
Hello,

either use:

IF (NVL(curcursor.CURRENT,0) + NVL(tdcursor.thirtydays,0) + NVL(sdcursor.sixtydays,0) + NVL(npcursor.ninetyplus,0) + NVL(custdetail.deposit)) != 0

or exclude NULL's in the first place:

SELECT NVL(SUM(totaldue-totalpaid),0) AS CURRENT FROM tempinvpostless30 INTO CURSOR curcursor WHERE ALLTRIM(custno) == ALLTRIM(scancust.custno)

...

besides this, assuming custno is the tables primary/foreign key
you're better of not using ALLTRIM in the SELECT statements since this isn't optimizable by rushmore

Regards
Christian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform