Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Firebird e Interbase (https://www.clubdelphi.com/foros/forumdisplay.php?f=19)
-   -   instrucción iif en vista Firebird (https://www.clubdelphi.com/foros/showthread.php?t=56492)

David Olmos 19-05-2008 16:50:35

instrucción iif en vista Firebird
 
Cuando en una vista Firebird utilizo el comando iif el sistema me rechaza el signo = (igual) cómo puedo superar esto?

RolphyReyes 19-05-2008 17:01:45

Saludos.

Extraído del Firebird 2.0.1 Release Notes.

Cita:

IIF Expression Syntax Added
O. Loa
IIF (<search_condition>, <value1>, <value2>)
is implemented as a shortcut for
CASE
WHEN <search_condition> THEN <value1>
ELSE <value2>
END
It returns the value of the first sub-expression if the given search condition evaluates to TRUE, otherwise it
returns a value of the second sub-expression.
Example
SELECT IIF(VAL > 0, VAL, -VAL) FROM OPERATION

Espero te sirva.


La franja horaria es GMT +2. Ahora son las 22:13:11.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi