Subject Re: [firebird-support] Force NULL to zero in calculation?
Author Lucas Franzen
Joe,

>>You should define columns like that as NOT NULL and / or use triggers to
>>set them to 0 when insering / updating.
>>This will save you a lot of trouble...
>
>
> Yes, good point. Unfortunately, that hasn't happened either.

Then go ahead, UPDATE all your columns to 0 where they are NULL and
write insert and update triggers that catch NULLS and replace them by 0.

Then you can use your original SQL.

Otherwise you've got to write a StoredProc or use an UDF function, or
write quite complex queries (ie using UNIONS) or ...

(You see: no easy way out of it but the one with triggers)

Luc.