Subject | Re: [firebird-support] case when, in, null semantics? |
---|---|
Author | Kjell Rilbe |
Post date | 2005-03-14T17:07:01Z |
Kjell Rilbe wrote:
no matter what. In my case the when-predicate evaluates to UNKNOWN, so
the then-value is not used. It proceeds to the else-value and picks
that. All in accordance with the SQL standard.
Right?
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> case when 'a' in ('b', nullif(1, 1)) then 1 else 0 endAh, I see! Case always returns one of the then-values or the else-value,
>
> I would expect this to return null, because the null item in the "in"
> list could possibly be an 'a', which would return 1. But it actually
> returns 0.
no matter what. In my case the when-predicate evaluates to UNKNOWN, so
the then-value is not used. It proceeds to the else-value and picks
that. All in accordance with the SQL standard.
Right?
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64