February 20, 2019 at 7:18 am
When attempting to diagnose issues with SSRS Reports, I often run into an issue where there is a multi-select parameter that needs to be populated. I have been creating a table variable and populating that with the values, and then updating the query to use IN (SELECT value from @tablevariable) , which is ok, but when you have a lot of multi-select parameters, is a real pain, not to mention it requires that I have to alter the query in SSMS , and then remember to fix everything when I finally figure out what is going wrong.
Is there a better way to deal with a multiselect parameter in TSQL ?
February 20, 2019 at 7:43 am
Multi-select parameters are passed to stored procedures as a comma-delimited list.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 20, 2019 at 1:37 pm
drew.allen - Wednesday, February 20, 2019 7:43 AMMulti-select parameters are passed to stored procedures as a comma-delimited list.Drew
Don't you need to use the Join() function in SSRS to get that to happen? That's in the parameters for the dataset where you would supply the expression...
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
February 20, 2019 at 2:19 pm
sgmunson - Wednesday, February 20, 2019 1:37 PMDon't you need to use the Join() function in SSRS to get that to happen? That's in the parameters for the dataset where you would supply the expression...
That's how I've typically done it with the expression:
=Join(Parameters!ParameterName.Value,",")
And then the query for that last dataset just has:
WHERE TheColumnUsedForTheParameters in (@ParameterName)
Sue
February 21, 2019 at 12:48 pm
sgmunson - Wednesday, February 20, 2019 1:37 PMdrew.allen - Wednesday, February 20, 2019 7:43 AMMulti-select parameters are passed to stored procedures as a comma-delimited list.Drew
Don't you need to use the Join() function in SSRS to get that to happen? That's in the parameters for the dataset where you would supply the expression...
Not when you are passing it to a stored procedure. It's not clear whether he is passing the parameters to a stored procedure or not.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply