Skip to content Skip to sidebar Skip to footer

Execute Stored Procedure For Each Row In The Table In Ssis

I would like to execute a stored procedure MyProc with certain input parameters for each row in the table MyTable. Column for each row will act like input values for MyProc. How d

Solution 1:

All you need is a Dataflow Task with an OLEDB source and an OLE DB Command transformation.

The OLEDB source SELECTs from the table that you want to perform the row-by-row stored procedure on.

It then is followed by an OLE DB Command transformation that calls the stored procedure and passes columns from the data flow to the parameters of the stored procedure.

This will result in the stored procedure being executed once for each row of your table. You don't need the initial Execute SQL, and you don't need the For-Each loop.

Post a Comment for "Execute Stored Procedure For Each Row In The Table In Ssis"