Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need help with null values
Message
 
 
À
07/08/2001 15:02:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00540860
Message ID:
00540912
Vues:
21
>>Thanks for the reply J.C.
>>
>>I saw the VFP documentation that says that it ignores NULL values. If it does, then why is it that x is not NULL? As you can see from my example code, I initalize x to NULL first then call the CALCULATE command.
>>
>
>If you calculate an AVG() on a field in a table with no records, you get 0.00 as the result. As far as the CALCULATE command is concerned, your table has no records.

I made a test table and tried it. CALCULATE returned 0.00 and
select avg(tt) from test into array atest
returned NULL
?atest[1]

So, we should know about this "feature" and use SQL if possible. However, SQL works with the disk table, while CALCULATE, AFAIK, works with buffered table...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform