Simple query including report parameter fails
Hi, I have a simple join that is of query type 'Text' in a Dataset within an SSRS report. It fails when trying to resolve the report parameter, prefaced below with @. select renewal_rqmt.cred_holder_rnwl_rqmt_id, renewal_rqmt.cred_hldr_rnrqmt_itm_id, rnwl_rqmt_item.cred_hldr_rnrqmt_itm_nm from renewal_rqmt, rnwl_rqmt_item where ( renewal_rqmt.cred_hldr_rnrqmt_itm_id = rnwl_rqmt_item.cred_hldr_rnrqmt_itm_id and renewal_rqmt.cred_hldr_rnrqmt_stty_id = '2' and rnwl_rqmt_item.notice_of_incomplete_fl = 'Y' and renewal_rqmt.cred_holder_id = '@PCREDHOLDERID' and renewal_rqmt.renewal_year = 2011 ) ORDER BY rnwl_rqmt_item.cred_hldr_rnrqmt_itm_nm ASC The error I receive is this: Query execution failed for dataset 'dsRenewalRequirements'. ORA-01722: invalid number. I've traced this problem to that one particular parameter and if I run this query using TOAD it works with no problem. Any suggestions? Thanks, Dan
May 5th, 2011 6:03pm

I don't think the Parameter needs to have quotes around it. Change it to renewal_rqmt.cred_holder_id = @PCREDHOLDERIDCraig Bryden - Please mark correct answers
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 6:46pm

Hi Craig, Yes, I tried that ... the problem then becomes the Report Designer won't even update the list of fields in the Dataset once I try to commit the change to the query by clicking <OK> on the 'Dataset Properties' dialog. The error I receive is: --------------------------- Microsoft Report Designer --------------------------- Could not update a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct. ORA-00936: missing expression To continue without updating the fields list, click OK. --------------------------- OK Cancel --------------------------- So, that suggestion actually makes the problem worse. Thank you anyway, Dan
May 9th, 2011 9:59am

Hi Dan To be honest, I have not worked with Oracle as a data source in over 10 years. What I suggested will work for SQL Server. Can you confirm which driver, "Oracle" or "OLE DB" you are using for the report?Craig Bryden - Please mark correct answers
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2011 6:06pm

Unfortunately I found out the hard way that for queries against an oracle DB, oracle requires that this line renewal_rqmt.cred_holder_id = '@PCREDHOLDERID' be changed to this: renewal_rqmt.cred_holder_id = :PCREDHOLDERID That is, no single quotes and no @ sign, instead use the colon : Thanks anyway, Dan
May 10th, 2011 12:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics