SSIS Execute a Stored Procedure with the parameters from .CSV file SQL Server 2005

后端 未结 4 531
陌清茗
陌清茗 2021-01-25 18:08

I\'m learning SSIS and this seems like an easy task but I\'m stuck.

I have a CSV file Orders.csv with this data:

ProductId,Quantity,CustomerId
1,1,104
2         


        
4条回答
  •  [愿得一人]
    2021-01-25 19:01

    If I understand correctly, what you want to do is execute a stored procedure 3 times for each row in the data source.

    What if you just create a data flow with a flat file data source and pipe the data through 3 execute sql command tasks? Just map the columns in the data to the input params of your stored procedure.

    Maybe I'm not seeing it correctly in your question and I'm thinking too simple, but in my experience you need to avoid using the foreach task in SSIS as much as possible.

提交回复
热议问题