Subject Re: [firebird-support] case when, in, null semantics?
Author Kjell Rilbe
Kjell Rilbe wrote:

> case when 'a' in ('b', nullif(1, 1)) then 1 else 0 end
>
> 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.

Ah, I see! Case always returns one of the then-values or the else-value,
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