Subject Re: [ib-support] Why does SUM() return null?
Author Nando Dessena
Roger,

> The query SELECT SUM(NUMERIC_FIELD_X) FROM TABLE_X WHERE ... returns
> NULL if no records are found. Both logic and intuition suggest that
> it should return zero.

Unfortunately neither logic nor intuition are in the field when you talk
about the SQL standard.
The introduction of the COALESCE function will help in cases like this.
I believe there are some *NVL UDFs available in the meantime.
Ciao
--
____
_/\/ando