Subject | Re: [firebird-support] WHERE and IIF |
---|---|
Author | Ismael L. Donis García |
Post date | 2008-04-19T16:53Z |
Perfect, era what wanted
Reiterated thank you
=========
¦¦ ISMAEL ¦¦
=========
----- Mensaje original -----
De: Fidel Viegas
Para: firebird-support@yahoogroups.com
Enviado: viernes, 18 de abril de 2008 07:43
Asunto: Re: [firebird-support] WHERE and IIF
Reiterated thank you
=========
¦¦ ISMAEL ¦¦
=========
----- Mensaje original -----
De: Fidel Viegas
Para: firebird-support@yahoogroups.com
Enviado: viernes, 18 de abril de 2008 07:43
Asunto: Re: [firebird-support] WHERE and IIF
On Sat, Apr 19, 2008 at 1:29 AM, Fidel Viegas <fidel.viegas@...> wrote:
I was looking again at your statement, and I think that this is what you want:
select cofaccob.entidad, cofaccob.docemp, sum(cofaccob.haber) as haber
from cofaccob
where cofaccob.entidad = iif(cofaccob.clave='CS', '2578', '2580')
group by cofaccob.entidad, cofaccob.docemp
order by cofaccob.docemp
Now that makes sense to me.
Give it a try and see if that is what you were after.
All the best,
Fidel.
[Non-text portions of this message have been removed]