title: How to pass list of items as parameter to a stored procedure
body: <p>I have a stored procedure</p>
  
  <pre><code>create PROCEDURE [dbo].[SP] 
  (
      @OrderList varchar(500)
  )
  AS
  Begin
      select * 
      from table 
      where id in ('+ @OrderList +')
  </code></pre>
  
  <p>Here I am passing orderlist....</p>
  
  <p>When I execute like this</p>
  
  <pre><code>exec sp 'iss005,iss006'
  </code></pre>
  
  <p>I am not getting data</p>
  
  <p>but when I hardcode in sp like this ...</p>
  
  <pre><code>   select * from table where id in ('iss005','iss006')
  </code></pre>
  
  <p>then am getting data...</p>
  
  <p>Thank you</p>