Subject function IIF
Author Ismael L. Donis García
The show the IIF gives me error within the WHERE in the equal sign indicated in red.
Firebird 2.0.3 does this show allow?
This same consultation operates well in Access 2003.

CREATE VIEW PRUEBA1 ( ENTIDAD, DOCEMP, HABER )
AS
select cofaccob.entidad, cofaccob.docemp, sum(cofaccob.haber) as haber from cofaccob
where iif((cofaccob.clave)='CS', (((cofaccob.entidad)='2578') and ((cofaccob.idedoc)='12008') and
((cofaccob.docemp)='2580') and ((cofaccob.cuenta)=135) and ((cofaccob.haber)>0) and
((cofaccob.fechac)='2008/02/29') and ((cofaccob.clave)='CS')), (((cofaccob.entidad)='2578') and
((cofaccob.idedoc)='12008') and ((cofaccob.docemp)='2580') and ((cofaccob.cuenta)=135) and
((cofaccob.haber)>0) and ((cofaccob.clave)='CO'))) group by cofaccob.entidad, cofaccob.docemp
order by cofaccob.docemp;

Thanks
=========
¦¦ ISMAEL ¦¦
=========

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