Subject | Re: [firebird-support] Force NULL to zero in calculation? |
---|---|
Author | Milan Babuskov |
Post date | 2004-08-17T18:14:24Z |
Joe Martinez wrote:
select z(saleprice), z(salecost), z(-saletradein) ... etc.
URL:
http://rfunc.sourceforge.net
--
Milan Babuskov
http://www.flamerobin.org
>>If you use FB1.5 you can do:You can use Z() function from rfunc UDF library.
>>
>>select
>> (
>> COALESCE ( saleprice, 0 ) -
>> COALESCE ( salecost, 0 ) -
>> COALESCE ( -saletradein, 0 )
>> ) as Profit
>
>>from sales where saledate = '08/08/04'
>
> No, unfortunately, it's FB 1.0.
select z(saleprice), z(salecost), z(-saletradein) ... etc.
URL:
http://rfunc.sourceforge.net
--
Milan Babuskov
http://www.flamerobin.org