Hi,
I have a select statement below which gives "AbtError: rc=-1 for '42610' in
an AbtIbmCliCSDatabaseConnection at (29.01.2007 15:43:13)
'[SQLSTATE=42610 - [IBM][CLI Driver][DB2/NT] SQL0418N A statement contains
a use of a parameter marker that is not valid. SQLSTATE=42610 [Native
Error=-418]]" error when i put it into multirow query. I guess its beacause
of variables beside the CASE expressions. How can i fix this?
select
sf.tldno,op.personelref,k.eskikod,p.siralama,o.adi ,o.soyadi,s.deep,s.eye,s.shallow,s.notron,s.beta,s .gama,s.yorum,s.sonuc,k.calismaalani,k.aktifmi
from
(dzmt.sonuc s
LEFT OUTER JOIN dzmt.dagitim d ON s.dagitimid = d.id
LEFT OUTER JOIN dzmt.sifirlama sf ON s.sifirlamaid = sf.id)
,dzmt.priyotlar p,rsgd.org_personelbilgileri o,dzmt.donemsayac
ds,dzmt.kurumdetay k,rsgd.org_personelindex op
where
d.periyodid = p.id and
p.yil = :yil and
d.personelid = o.id and
sf.donemsayacid = ds.id and
k.id = ds.kurumkod and
op.personelref = o.id and
((s.sonuc = (CASE :sonuc
when 'E' then 'E'
when 'GELMEYEN' then 'A'
END)) or ((s.deep between (
CASE :sonuc
when 'MDL-0.99' then 0.1
when '1.0-4.9' then 1
when '5.0-9.9' then 5.0
when '10.0-14.9' then 10.0
when '15.0-19.9' then 15.0
when '20.0-29.9' then 20.0
when '>30.0' then 30
when 'MDL' then 0
END) and (CASE :sonuc
when 'MDL-0.99' then 1
when '1.0-4.9' then 4.9
when '5.0-9.9' then 9.9
when '10.0-14.9' then 14.9
when '15.0-19.9' then 19.9
when '20.0-29.9' then 29.9
when '>30.0' then 1000
when 'MDL' then 0.1
END))))