Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Why does this sql not work with parameter but works hard coded
ianlufc
Hi Guys
Can you tell me why the following SQL wont work when i edit a Data Set
select value from foapp.TOCCASEALIAS where I_OCCASE_CASEALIAS in
(select I_OCCASE_ASSOCIATEDDOC from foapp.tocextradata where i in
(select fk_ed_i from foapp.t_productfeature where ? ='Yes'))
But this will
select value from foapp.TOCCASEALIAS where I_OCCASE_CASEALIAS in
(select I_OCCASE_ASSOCIATEDDOC from foapp.tocextradata where i in
(select fk_ed_i from foapp.t_productfeature where feature1 ='Yes'))
the error i get from the first one is
- Cannot execute the statement
SQL statement does not return a Result object
SQL error #1: db2 error: SQLCODE -302, SQLSTATE: 22001,SQLERRMC: null
cant copy the entire stack trace from eclipse preview view
Thanks
Find more posts tagged with
Comments
mwilliams
Hi ianlufc,
What version of BIRT are you using? I'll check it out in your version.
ianlufc
Hi Micael
Im using 2_3_2 through eclipse
Thanks
Ian
ianlufc
Hi Michael (apologies for a typo in your name on the last post)
i got that sql working i done the following
in data set sql
select value from foapp.TOCCASEALIAS where I_OCCASE_CASEALIAS in
( select I_OCCASE_ASSOCIATEDDOC from foapp.tocextradata where i in (
in script before Open
this.queryText = this.queryText +"select fk_ed_i from foapp.t_productfeature where " + params["feature"]+ " ='Yes'))";
Thanks a million
mwilliams
Ian,
You could set up the same idea in the beforeOpen script of the dataSet using the report parameter in place of the '?' using a this.queryText = this.queryText + " where blah...."; statement. That would definitely work.