Subject Re: [firebird-support] How to change SUM() result NULL to 0
Author Uwe Grauer
jasajona wrote:

>
> Hello,
>
> How to change SUM() result NULL to 0
>
> -----------------
> select
> sum(field1)
> from
> table1
> group by
> field2
> -----------------
> So if sum(field1) returns NULL I want to see it as 0.
> I tryed many things but no one work (all I get is NULL). Is it FB bug?
> I am
> using 1.5.1 .
>
Use COALESCE.
It's in the FB1.5 Release Notes.
And no, it isn't a Bug.

Uwe