title: How to create a dynamic IN query in SSIS 2008?
body: <p>I have a variable @csv which hold a comma separated value such as:
  -a
  -a,b
  -a,b,c</p>
  
  <p>I need to pass it in a query in my OLE DB source in a data flow to create a query such as:</p>
  
  <p>SELECT COUNT(1) FROM table WHERE col1 IN @csv</p>
  
  <p>So if @csv="a,b" then internally it should resolve into </p>
  
  <p>SELECT COUNT(1) FROM table WHERE col1 IN 'a','b'</p>
  
  <p>How can this be best achieved in SSIS 2008? Can I avoid the script component to create a dynamic query and storing it in a variable?</p>