question

adiamr avatar image
adiamr asked

Calling one stored procedure from another using ssis

Hi , I have 2 stored procedures A and B . A returns multiple rows , I want to select each row to call stored procedure B. I am kind of routing for OLE DB Command for this , but not sure how to start and go about with the flow . 1. I use Execute SQL task for call the 1st stored procedure 2. Use OLE DB Command to call Stored Procedure B. 3. I use this by mapping a parameter from A and B? Any help/suggestion would be grt...
ssisstored procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Shawn_Melton avatar image
Shawn_Melton answered
You can either do this via strict T-SQL which would be letting SQL Server do all the work technically. Other option is to send your output for procedure A to an object parameter in the SSIS package. You then build a foreach loop on that parameter that iterates over each row, and within that container just call the execute t-sql task to call procedure B.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

adiamr avatar image adiamr commented ·
The second option sounds good....I will definitely try this and let you know.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.