2

I declare two variables as "Object" named a and b, and have a simple SQL task:.

select code from code_list

Using Full result set, I'm trying to pass the result to the variables declared(a and b),

and use them(a and b) on Script Task with two different foreach loops。But it didn't work.

Script Task: insert the result into two different tables(A and B).

biasic
  • 21
  • 2

1 Answers1

0

Create 3 variables of type Object, only use one as ResultSet. Then Add a Script Task, and select 3 variables as Read/Write Variables.

Inside the Script Task, Create two DataTable variables, and Fill one table with the ResultSet variable:

Then Copy the first DataTable into the second DataTable Variable using dataTable1.Copy() method

At the end, assign each DataTable to one package Variable.

Hadi
  • 36,233
  • 13
  • 65
  • 124