Subject Re: [firebird-support] Subquery and returning "0"
Author Mark Rotteveel
On 12-7-2014 18:30, Svein Erling Tysvær
svein.erling.tysvaer@... [firebird-support] wrote:
> Your statement is equivalent to "CASE WHEN umowy.numer_umowy IS NULL THEN 0 ELSE NULL END", so I think your problem simply is that NULL is returned if numer_umowy has a value. You may get the result you want by changing to:
>
> CASE WHEN umowy.numer_umowy IS NULL THEN 0 ELSE umowy.numer_umowy END

Good find, I had totally overlooked that.

Mark
--
Mark Rotteveel