So there is a lot of stuff about using SSRS parameters to select multiple values but nothing about using both a parameter and a fixed value using the in select statement.

So what I'm trying to do is this:

select * from table where id in (Parameter_1, 'total')

Yet when I do that it complains its can't find 'Parameter_1'.

I've gotten another report to work when its just:

select * from table where id = Parameter_2

but this this isn't good enough in this use case.

Ok the problem was actually with the parameter itself.

I had to create a new one in the query called @Parameter_1 and then set it up in the query parameter tab and delete the old one.

Really confusing.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.