Subject Re: [firebird-support] NULL in exprssions
Author Alberto Pesce
Thanks to kokou Fostin <atahman@...> and Lester Caine
<lester@...>
COALESCE works fine.

Bye Alberto Pesce

----- Original Message -----
From: "Lester Caine" <lester@...>
To: <firebird-support@yahoogroups.com>
Sent: Sunday, February 20, 2005 10:54 AM
Subject: Re: [firebird-support] NULL in exprssions


>
> 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
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>