Hello,
I have a sql statement that creates like a corsstab query.
This works very well,
the problem that I have is that for the pdr and pcr I have
pdr01 pcr01
pdr02 pcr02
pdr03 pcr03
pdr04 pcr04
and so on up to 12
I am not sure how I would put that into my sql statement
Any help is appreciate it
I have a sql statement that creates like a corsstab query.
Code:
select mainf.gel.gln, sum(case mainf.gel.gltyp when 1 then mainf.gel.pdr05-mainf.gel.pcr05 else 0 end) MayCurrent,
sum(case mainf.gel.gltyp when 2 then mainf.gel.pdr05-mainf.gel.pcr05 else 0 end) MayBudget
from mainf.gel group by mainf.gel.gln
the problem that I have is that for the pdr and pcr I have
pdr01 pcr01
pdr02 pcr02
pdr03 pcr03
pdr04 pcr04
and so on up to 12
I am not sure how I would put that into my sql statement
Any help is appreciate it