I have an SSRS data source that I would like to test out in SQL Server so that I can see the exact result set. The report that I'm using makes use of a multivalued parameter in the report which is passed into the query as a clause
AND T.OrderType IN (@OrderType)
What I would like to do is at the top of the statement in SQL to declare a variable to be referenced here. This is an example of an approach which I tried which did not work
DECLARE @OrderType VARCHAR(255); SET @OrderType = '''StringValue1'',''StringValue2''';
However, this failed to produce the desired results (No records were returned)
I can create the variable and have it successfully return rows for a single type, but generally I'd like to see the same behavior when testing the data source as I would in SSRS. The below is the code which successfully returns a single order type
DECLARE @OrderType VARCHAR(255); SET @OrderType = 'StringValue1';