I have a variable @csv which hold a comma separated value such as: -a -a,b -a,b,c
I need to pass it in a query in my OLE DB source in a data flow to create a query such as:
SELECT COUNT(1) FROM table WHERE col1 IN @csv
So if @csv="a,b" then internally it should resolve into
SELECT COUNT(1) FROM table WHERE col1 IN 'a','b'
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?