title: While testing i want to insert multiple values in a variable
body: <p>I am testing some sql code that can take in multiple values into it, they are then compared by using an 'IN' statement. How do I simulate this for testing. Heres what I'm Using but it returns nothing, which is incorrect, because when I send in multiple values in my SSRS report, it works. I'd like @item to simulate what its getting from SSRS when the report is run.</p>
  
  <pre><code>Declare
  @item VarChar(100)
  
  Set @item = ('1003932,1003933,1003934')
  
  
  
  
  SELECT DISTINCT
      CUSTNAME,
      ISNULL(NAME, LOGCREATEDBY) AS 'Modified By'
      ,b.ITEMID as 'Item Id'
      ,[PRICE_NEW] as 'New Price'
      ,[PRICE_OLD] as 'Old Price'
      ,[PRICEUNIT_NEW] as 'New Unit Price'
      ,[PRICEUNIT_OLD] as 'Old Unit Price'
      ,LOGCREATEDDATE as 'Created Date' 
      ,(Select TOP 1 INVENTTRANS.DATEFINANCIAL From INVENTTRANS Where INVENTTRANS.ITEMID = @item order by INVENTTRANS.DATEFINANCIAL desc) As 'LastInvoice'
  FROM PMF_INVENTTABLEMODULELOG AS b
      LEFT JOIN USERINFO ON ID = LOGCREATEDBY
      LEFT JOIN INVENTTABLE AS a on a.ITEMID in (@item)
  WHERE b.ITEMID in (@item)
  order by LOGCREATEDDATE  desc
  </code></pre>