title: Recreating SSRS Data Source in TSQL for testing
body: <p>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</p>
  
  <pre><code>AND T.OrderType IN (@OrderType)
  </code></pre>
  
  <p>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</p>
  
  <pre><code>DECLARE @OrderType VARCHAR(255); SET @OrderType = '''StringValue1'',''StringValue2''';
  </code></pre>
  
  <p>However, this failed to produce the desired results (No records were returned)</p>
  
  <p>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</p>
  
  <pre><code>DECLARE @OrderType VARCHAR(255); SET @OrderType = 'StringValue1';
  </code></pre>