>>>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--