birt sql dataset with parameters sql error -


I have a Birt dataset for the DB2 query. My query works fine without parameters without the following query. .

  with params (SELECT '2014-02-16' end, '1' from locationid fROM sysibm.sysdummy1) select t.registerid (select ... from paramet, mytable SOS where SOS.Lostation = Parameters.Laocitid and SOS.Reporcitip = 'XX' and SOS. Repository index = 'XX' and SOS. Pernalid = 'X Date and date (SOSL Announcement date)   

between date (params.editat) -6 days and date (Soms.Marminid, SOSLNenzate, Params.and Group

but when I change the top row to ... with the parameters as (SELECT? Enddate,? Locationid fROM Sysibm.sysdummy1)

and two input parameters of string data tip I get DB2 errors Sqlcode-418 but I So that it is not my line is my queries.

What is the correct way to set parameters for me, so there is no error?

Thanks

I'm not familiar with DB2 programming, but on Oracle? Works anywhere in the query.

Have you seen?

It seems that this is a bit more complicated on DB2 and you should use "typed parameter marker".

The doctor says:

typed parameter marker

A parameter marker specified with its target data type in a typed parameter marker The general form is: This type of CAST specification as a CAST (? Data-type) is a "promise" that the data type of the parameter will be of the data type at run time that is specified or some data assigned to the specified data type Type been done. Also, always be assured that your date strings are in format that expect DB, and use a clear format mask in the date function, such as:

  As with the params (select (varchar (10)) in the form of termination, cast (as varchar2 (80)) sysibm.sysdummy1 from localized) ... select ... from params, ... Where between date ... and date (sos.balanceDate) (XXX (params.enddate)) - 6 days and date (XXX (params.enddate)) ...   

Unfortunately From me Paco could not tell it should look at how XXX function DB2. On Oracle, the example

  to_date ('2014-02-18', 'YYYY-MM-DD')   

will be on DB2, see < / P>

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -