Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding NULL with SUM
Message
 
 
To
14/01/2005 13:10:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00977283
Message ID:
00977296
Views:
19
>>>With VFP 9, if you SUM a column and the where clause doesn't return any data, you end up with NULL. How can I obtain 0?
>>
>>Try
NVL(SUM(...), 0))
>
>From that side, it works. But, isn't there a setting I could turn ON in VFP 9 to avoid changing all that in the code?

You can try SET ENGINEBEHAVIOR 80 but I doubt that it'll have any affect on this behavior because it's not listed in the help for this command.
BTW, returning Null is correct ANSI complient behavior.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform