Friday, February 24, 2012

Looping through a Resultset in SSIS

1. create an Execute SQL task, set its ResultSet to be Full result set. In the resultSet, define the result name as 0. variable name is type of Object.
2.create a foreach loop container, define its collection to be "Foreach ADO enumerator", and specify the ADO object source variable to be the one defined in step 1.
3.in the variable mappings, define the user variable to receive value for each column. each column is defined by sequence from 0.

No comments: