Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When SELECT SUM()... doesnt
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
When SELECT SUM()... doesnt
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00999926
Message ID:
00999926
Vues:
70
Just an FYI

I just had an error under VFP9, that worked ok under VFP8. The problem was with SUM(). Working on a clients project, they had a
select sum( somefield ) FinalValue;
   from sometable ;
   where testclause ;
   into cursor myresult
Under VFP8, even if no records matched the "MyResult.FinalValue" was always coming back as a valid numeric value, even if it was zero.

However, under VFP9, if no records qualified the where clause, the value came back as NULL. So... caution if you may have something like this and a possible no qualified results be sure to check for NULL...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform