0

For a SSIS, i have to transfer data from a server to another but on the final destination, i have a column like ID. For determinate the new ID of each row, i have to execute a stored procedure on the final server.

Is-it possible to do that in DataFlow and avoid the Foreach Loop in ControlFlow ?

Regards, Guillaume.

4

2 回答 2

1

No, I don't think it is. I suggest following the DataFlow task with an Execute SQL task that will execute your stored procedure.

于 2013-01-24T09:04:07.727 回答
1

You can do this task using OLEDB command . If your SP has a return statement than try to capture the return value and map it with your input column

exec ? = dbo.ReturnID

This statement will create a @RETURN_VALUE which you need to map with the input ID column .Remember to create an Input ID column in the source itself as NULL or any value so that you can map this column in OLEDB component with the @RETURN_VALUE

Update 1 :

Try this :-

EXEC dbo.my_sp 'p1', 'p2',@variable_name=? output

@variable_name is the output variable name used in your stored procedure

于 2013-01-24T09:20:49.133 回答