Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need help with null values
Message
 
 
To
07/08/2001 15:02:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00540860
Message ID:
00540912
Views:
28
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform