• Hi nomvula.

    You need to set up an expression on your data flow task. it will let you dynamically set the SQL Command for your OLE DB source.

    So, properties for the data flow, add expression, SQL command type, then put in a formula to build your query using the variable you build. Remember though, you are building a string with the query in it, not parameterizing the query, so your formula will be outputting the variable into a string and appending that string into your query. Format it accordingly.

    Generally I design the whole data flow first with its own SQL command hard coded, then add the expression at the end.