A text doc has insert statements that need to be executed. How would I create a SSIS package to run these statements?
This is what I have so far: a Data Flow connected to an Execute SQL Task. The Data Flow has a flat file source (text doc) connected to a script task. The Flat file has only one column which is the insert statement. I've created a variable in the data flow task. In the script task I've assigned the column to the variable so now the insert statement is assigned to the variable. Now what I'd like to do is assign the variable to the execute sql task so the sql task will run the insert statement. I would have this in a for loop so all the insert statements will run.
The problem that I'm coming across is that the scope of the variable that I created in the data flow task isn't available in the package level. Do I have to create a global variable so the variable is also available in the control flow task?
Thanks.
This is what I have so far: a Data Flow connected to an Execute SQL Task. The Data Flow has a flat file source (text doc) connected to a script task. The Flat file has only one column which is the insert statement. I've created a variable in the data flow task. In the script task I've assigned the column to the variable so now the insert statement is assigned to the variable. Now what I'd like to do is assign the variable to the execute sql task so the sql task will run the insert statement. I would have this in a for loop so all the insert statements will run.
The problem that I'm coming across is that the scope of the variable that I created in the data flow task isn't available in the package level. Do I have to create a global variable so the variable is also available in the control flow task?
Thanks.