Subject Re: [firebird-support] NULL in exprssions
Author Lester Caine
Alberto Pesce wrote:

> How can I get in a Query this
>
> if B.field = NULL
> A.field * B.field = 0
> else
> A.field * B.field = X
>
> Using a join I obtain that if B.field = NULL, A.field * B.field = NULL

COALESCE( A.field * B.field, 0 )
should work - will give 0 if either A or B is NULL


--
Lester Caine
-----------------------------
L.S.Caine Electronic Services