Subject Re: SUM
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Sun, 14 Jan 2024 11:53:21 +0000
Newsgroups dbase.getting-started

Hi Mervyn,

Eeek! It's a matter of preference, but I try to avoid nulls as much as
possible. "Set AutonullFields Off" and "xxx.rowset.autonullfields=false"
are my friends here and neither are the default settings in dBASE.

Andy

> I've done a bit of digging in where a null value in a field will cause
> problems.
>
> DML
>
> sum fieldValue to mVar       Null does not cause a problem
> mVar += fieldValue           Null does not cause a problem
> mVar = mVar + fieldValue     Null causes a problem.
>
> OODML
>
> sum(fieldValue)              Null does not cause a problem
> mVar += fieldValue           Null causes a problem
> mVar = mVar + fieldValue     Null causes a problem.
>
>
> Mervyn.
>