Execute SQL Server Stored Procedure Multiple times in a loop

Highlighted
Seven Stars

Execute SQL Server Stored Procedure Multiple times in a loop

Hi,

 

I want to execute the same stored procedure 3 times but with different values of input parameter to stored procedure for each of these 3 iterations. Basically stored procedure creates different sql depending upon the value of the parameter.

 

Can some one please tell me how this can be done? Any turtorial or video for this would be of great help.

 

Regards

Tarunjit Singh


Accepted Solutions
Forteen Stars

Re: Execute SQL Server Stored Procedure Multiple times in a loop

generally similar way:

 

https://community.talend.com/t5/Design-and-Development/how-to-iterate-tRESTClient-page-number-from-M...

 

not important - is it REST server or Stored procedure

 

in any case the best way - do anything, and ask help when error or problem happens

 

 

 

 


https://community.talend.com/t5/What-s-new-and-announcements/We-are-all-developers-here-aren-t-we/m-...

 

 

-----------

All Replies
Forteen Stars

Re: Execute SQL Server Stored Procedure Multiple times in a loop

You just need:

 

tLoop for 3 iteration
tJava or tFixedFlowInput for store parameters for each iteration and call procedure with current parameters

-----------
Seven Stars

Re: Execute SQL Server Stored Procedure Multiple times in a loop

Hi,

 

Thanks for the answer.

 

How can we pass different values in parameter of stored procedure for each iteration in tFixedFlowInput.

 

Here is an example :-

  • For first iteration we need to pass value 'ABC' in parameter of stored procedure.
  • For second iteration we need to pass value 'DEF' in parameter of stored procedure.
  • For second iteration we need to pass value 'GHI' in parameter of stored procedure

Any tutorial regarding passing dynamic values in stored procedure parameters will be of great help.

 

Regards

Tarunjit Singh

Forteen Stars

Re: Execute SQL Server Stored Procedure Multiple times in a loop

generally similar way:

 

https://community.talend.com/t5/Design-and-Development/how-to-iterate-tRESTClient-page-number-from-M...

 

not important - is it REST server or Stored procedure

 

in any case the best way - do anything, and ask help when error or problem happens

 

 

 

 


https://community.talend.com/t5/What-s-new-and-announcements/We-are-all-developers-here-aren-t-we/m-...

 

 

-----------

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch