Friday, September 06, 2013

For Loop and For Each Loop

For Loop and For Each loop both are used for looping the object or tasks in SSIS package. But both of them work differently.
For Loop is like normal for loop where you defines the EVAL expression and task loops that no of times. For example if you want to iterate some task 20 times it will loop for 20 times and then stop.
While For Each Loop works for object level let say we have a folder in which there are multiple files and these files need be dumped into database. For this you need to iterate for each file which is possible through for each loop task. For Each loop task will iterate for each file in the folder. You can say its iterates for the collection. For each loop has multiple type of iterates.

No comments:

Post a Comment