November 30, 2018 at 8:57 am
I use SSIS 2012
I have an SQL query that is working fine for one value, which will dump into a table.
The SQL Code is like this:
Declare @Managers as varchar(50) Set @Managers = ‘AAA’
(Select xxxxxxxx …. From myTable Where ManagerID = @Managers)
The result will append approximately 200 records to the table on each variable. Let's call it "Data Table."
We have another table generated from a query that will display the values of these variables. The result will return something like:
ManagerID (Field Name)
AAA AAAB AAAC AAABA AAAD AAADA
......
Etc.
We have approximately 100+ values in this table, let's call Table A.
In the SSIS package, there is a use of “For Loop Container” and “For Each Loop Container”.
How can I utilize these features in order to have each variable gone through the same SQL query by looping through the end of query / table and produce the results that we need?
We should end up with approximately 20,000 records appending into the Data table.
Any suggestions are welcome. Thank you.
Viewing 0 posts
You must be logged in to reply to this topic. Login to reply