For Loop Container in SSIS

20-03-2019  0 Comment(s)

The For Loop Container in SSIS will repeat the SQL Integration Services tasks for given number of times, until the given condition is False. This is same as the For Loop in any programming language. In this article we will show you the step by step approach to configure the For Loop in SSIS with example.

we will create a variable. Next we are going to increment that variable by 1 using the For Loop, and then save that value in the table that we created above. In order to do so, First Drag and drop the For Loop Container into the Control Flow region as shown below

Double click on it will open the For Loop Editor. You can use this editor to configure it. Please refer For Loop in C Programming to understand the programming flow of the For Loop in step by step manner. Even if you don’t know C language, it will help you understand the loop concept.

InitExpression: For loop starts with the initialization statement so, initialization of counter variable should done first (For example @counter = 1 or @i = 1.).
EvalExpression: The value of the counter variable is tested against the test condition. If the condition is True then it will execute the For loop container. If the condition fails then For loop will be terminated.
AssignExpression: This expression is executed after the end of each iteration. It helps to increase or decrease the counter variable as per our requirement.

Comment Here


No Comments to Show