I'm trying to find out how to load data from/to multiple tables in SQL Server.
I have 30+ tables in source and target database (both have the same table names and columns), so I used a foreach loop container to loop through each of the table with 1 DFT. I also have variables (SourceQuery & TargetQuery) that holds the query to use in ole db source/destination.
But when I use the TargetQuery in ole db destination I'm getting this error:

Anyone know a proper way to use a variable in the ole db destination? Or any other solution would be great as well.
ehs.asm_completion, notselect * from ehs.asm_completion. You should have really just got this working for one table before you tried making it dynamic. - Nick.McDermaid