|Subject||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
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,