Error in SQL Command when I changed the ResultSetType_Rowset Property

  • Hi,

    How to go row by row from a resultset using an SQL query and a task foreach loop?

    Requires that for each rows in the cycle are carried out in some particular tasks.

    Thanks

    xavendano

  • How to go row by row from a resultset using an SQL query and a task foreach loop?

    Requires that for each rows in the cycle are carried out in some particular tasks.

  • duplicate thread, see link

  • Use the SQL Query in the Execute SQL Task, set the resultset as "Full Result set", in the results use a variable that is defined of type "Object".

    Use the For Each loop container, go to collections, set the Enumerator as "Foreach ADO Enumerator" and in the Enumerator Configuration, choose the ADO object source variable as the one from the above SQL Task. By default it will select "Rows in the first table", leave this as is.

    Finally in the variable mappings tab map the defined variables to the column index from the resultset (starts from 0).

    Hope this helps.

    Cheers,

    Amol

    Amol Naik

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply