Subject | RE: [firebird-support] WHERE and IIF |
---|---|
Author | Leyne, Sean |
Post date | 2008-04-16T22:34:05Z |
Ismael,
CASE
WHEN <search_condition> THEN <value1>
ELSE <value2>
END
I'm not sure what you are trying to accomplish, so I can't help further.
Sean
> The function the IIF gives me error within the WHERE in theYou are using IIF incorrectly, IIF is a shortform for
> equal sign indicated in red. (Second equal sign after
> function IIF --> cofaccob.entidad='2578')
>
> select cofaccob.entidad, cofaccob.docemp, sum(cofaccob.haber)
> as haber from cofaccob where iif(cofaccob.clave='CS',
> cofaccob.entidad='2578', cofaccob.entidad='2580') group by
> cofaccob.entidad, cofaccob.docemp order by cofaccob.docemp
CASE
WHEN <search_condition> THEN <value1>
ELSE <value2>
END
I'm not sure what you are trying to accomplish, so I can't help further.
Sean