Subject Re: [firebird-support] Re: Why this sql not work ?
Author Kjell Rilbe
Den 2012-03-20 10:50 skrev nathanelrick s�h�r:
>
> sorry, my fault i want to say
>
> Select
> (select ...) AS MyFIELD2
> IIF(MyField2 is null, select ...., Null) As MYField3
> From
>
>

Can't refer to a column like that, no. You could perhaps wrap it in a
subquery:

select ...
MyFIELD2,
case when MyFIELD2 is null then select ... end As MYField3
from (
Select
(select ...) AS MyFIELD2
IIF(MyField2 is null, select ...., Null) As MYField3
From
) Subq

Kjell

--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64



[Non-text portions of this message have been removed]