I recently encountered a situation where I was using a
source SQL Command inside an OLE DB Source in SSIS DFT and a simple query using
three tables. The query was relatively simple – just calling the common columns from the
tables using ‘UNION ALL’. The package was set and in the production
Subsequently, there was an enhancement in the module and one new
extra table was added with the same common columns. I needed to
refer this new table in the same way as the three previous tables, using the
common columns with ‘UNION ALL’. Due to this, I needed to go and change the Package
source query in the sql command again.
This procedure worked perfectly well but for additional enhancements I
wanted a more generalized solution. After much deliberation and testing I
finally ended up with a solution using variables.
Please read the complete article on sql-server-performance.com.
Tags: SSIS, dynamic, tables, union all