How to use Coalesce to replace 'zero'

UDA
N/A

How to use Coalesce to replace 'zero'

Can anyone know how to use Coalesce to repalce 'zero' (not the null values)?

SEL
Coalesce(sum(a.TotScanAmt),1) TotScanAmt,
FROM
sales a

I don't want to use this CASE.
Thanks
1 REPLY
N/A

Re: How to use Coalesce to replace 'zero'

SEL
Coalesce(NullifZero(sum(a.TotScanAmt)),1) TotScanAmt
FROM
T1 a

You may not want to use CASE, but Coalesce and Nullifzero are both forms of CASE!