Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Pass multi value parameter to database stored procedure
javadev21
Hi all,
Is it possible to pass a multi value report parameter to a stored procedure? I have seen examples of using "Before open" and dynamically creating a comma delimited list to be used in a regular SQL query using the IN clause. However, I haven't been able to find an example using a stored procedure. For example, I have the following as my Query:
{call TEST.PKG_REPORTS.GETDISCREPANCIES(?,?)}
The input to this procedure is a multi value report parameter so I am not able to link it. Is there a way I can pass a comma delimited list of the multiple values as the input to my procedure?
Thanks
Find more posts tagged with
Comments
javadev21
I was able to figure this out. For anyone else who might have a similar question, I was able to set the input parameter to the values selected in a multi value report parameter by using setInputParameterValue in "Before open" and using join to have the list comma delimited.
this.setInputParameterValue("I_DISC_CODES", params["DISCREPANCY_CD"].value.join("," ) );
"I_DISC_CODES" is the name of the input parameter in my dataset. "DISCREPANCY_CD" is the name of my multi value report parameter.
mwilliams
Hi javadev21,
Sorry for the delay. Was going to suggest that the same should work, but it looks like you figured that out! Let us know whenever you have questions!