Subject Re: [firebird-support] values null in summation of record
Author Michael Ludwig
Ismael L. Donis Garcia schrieb am 17.05.2012 um 09:06 (-0400):
> select sum(t.saldo) as saldo from table1 t where
> returns 1 record with value null
> As I make in order that do not return records in this case?

Use COALESCE to coerce NULL into 0:

select id, coalesce(sum(saldo), 0) as saldo
from table2
group by id;