Subject | Convert DBISAM Sql to Firebird Sql |
---|---|
Author | Manuel Salinas |
Post date | 2006-12-02T16:08:18Z |
Hi,
Can somebody help me converting this sql to run in Firebird 1.5.3?
This Sql statement generates a Pivot table, if "concepto" does not
exist for a "Numero", the resulting column for that row will be 0.
Select Numero,
Sum(if (concepto=1 then cast(valor as float) else cast(0 as float)))
as Val1,
Sum(if (concepto=80 then cast(valor as float) else cast(0 as float)))
as Val80,
Sum(if (concepto=85 then cast(valor as float) else cast(0 as float)))
as Val85
From Movtos
group by numero
I was reading it could be possible using Stored Procedures... can
somebody share with me an example?
Thanks in advance.
Can somebody help me converting this sql to run in Firebird 1.5.3?
This Sql statement generates a Pivot table, if "concepto" does not
exist for a "Numero", the resulting column for that row will be 0.
Select Numero,
Sum(if (concepto=1 then cast(valor as float) else cast(0 as float)))
as Val1,
Sum(if (concepto=80 then cast(valor as float) else cast(0 as float)))
as Val80,
Sum(if (concepto=85 then cast(valor as float) else cast(0 as float)))
as Val85
From Movtos
group by numero
I was reading it could be possible using Stored Procedures... can
somebody share with me an example?
Thanks in advance.