Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006

    Unanswered: 42610 Invalid use of a parameter marker ?


    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?

    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
    (dzmt.sonuc s
    LEFT OUTER JOIN dzmt.dagitim d ON s.dagitimid =
    LEFT OUTER JOIN dzmt.sifirlama sf ON s.sifirlamaid =
    ,dzmt.priyotlar p,rsgd.org_personelbilgileri o,dzmt.donemsayac
    ds,dzmt.kurumdetay k,rsgd.org_personelindex op
    d.periyodid = and
    p.yil = :yil and
    d.personelid = and
    sf.donemsayacid = and = ds.kurumkod and
    op.personelref = 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

  2. #2
    Join Date
    Jan 2007
    Jena, Germany
    Please tell us a bit about your environment: DB2 environment, application programming language, ...

    My guess would be that you do not have embedded SQL and, therefore, DB2 does not know the data type of your host variable and can also not derive it from column definitions and the like. So you will have to explicitly "type" your parameter marker:
    CAST(:marker AS INTEGER)
    p.s: It would be a good idea to scale down your query to the point that the error still occurs but the stmt is very simple (just a few lines).
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Dec 2006
    I m using DB2 ver 8.02 and development env. is VASmalltalk 6.02. But it seems like working when i use CAST.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts