开发者

How do you restrict a query based on a parameter with multiple values in SSRS 2008?

I have a parameter called @OS. I'm taking the values for it from a query. I need people to be able to "Se开发者_开发知识库lect All" and have the query return info for all of the values.

But I have a query: SELECT * FROM dbo.tblOutreachSpecialists WHERE LastName=@OS

That parameter is from the parameter in the report.

I've checked the box "allow multiple values" and I now have a "Select All" option in it. However, the report still crashes for obvious reasons...the query is setup for only one value really.

Is there a setting I can change or a way to rewrite the query to accomodate this?


Use IN operator. Duh. WHERE somecritera IN (@parameter).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜