Subject Re: [firebird-support] coerce null to 0
Author bill_lam
Jason Dodson wrote:
> You have it backwards:
> select sum(coalesce(amt,0))...
> amt being the field to evaluate
> 0 being the value to replace null with
> Nick wrote:
>> select sum(coalesce(0,amt)) ...
Thank you for all.
Incidentally, I want
select coalesce(sum(amt),0) from balc where ....
amt itself never null, but the where clause may select no rows.