Answered by:
when to use ForEach/For Loop/Sequence Container?

Question
-
Hi Guys, can somebody tell me in simple words when should i use ForEach/For Loop/Sequence Container. sometimes i get so confused when to use which one for what situation.
Thanks
Monday, November 8, 2010 9:15 PM
Answers
-
For Each loop :
When you are not sure how many times the loop needs to run especially when you want to do a set of process for each file in a folder, or number of records in an object variable.
For Loop: When you know that a task need to run for a fixed amount of time like 10 iterations.
Seq Container: It is used to club together different tasks into logical gorups for better understanding and setting transactions to a set of tasks.
Tweet me..
- Proposed as answer by Reza RaadMVP Monday, November 8, 2010 9:22 PM
- Marked as answer by SqlRockss Tuesday, November 9, 2010 2:30 PM
Monday, November 8, 2010 9:19 PM -
do u know any article on these showing use of each of them, so i can create sample packages.
try these links:http://sql-bi-dev.blogspot.com/2010/06/ssis-containers.html
http://sql-bi-dev.blogspot.com/2010/06/sequence-container-in-ssis.html
http://sql-bi-dev.blogspot.com/2010/06/for-loop-container-in-ssis.html
http://sql-bi-dev.blogspot.com/2010/06/foreach-loop-container-in-ssis.html
http://www.rad.pasfu.com- Proposed as answer by Jack Nolan Tuesday, November 9, 2010 2:23 PM
- Marked as answer by SqlRockss Tuesday, November 9, 2010 2:30 PM
Monday, November 8, 2010 9:31 PM
All replies
-
For Each loop :
When you are not sure how many times the loop needs to run especially when you want to do a set of process for each file in a folder, or number of records in an object variable.
For Loop: When you know that a task need to run for a fixed amount of time like 10 iterations.
Seq Container: It is used to club together different tasks into logical gorups for better understanding and setting transactions to a set of tasks.
Tweet me..
- Proposed as answer by Reza RaadMVP Monday, November 8, 2010 9:22 PM
- Marked as answer by SqlRockss Tuesday, November 9, 2010 2:30 PM
Monday, November 8, 2010 9:19 PM -
do u know any article on these showing use of each of them, so i can create sample packages.Monday, November 8, 2010 9:23 PM
-
do u know any article on these showing use of each of them, so i can create sample packages.
try these links:http://sql-bi-dev.blogspot.com/2010/06/ssis-containers.html
http://sql-bi-dev.blogspot.com/2010/06/sequence-container-in-ssis.html
http://sql-bi-dev.blogspot.com/2010/06/for-loop-container-in-ssis.html
http://sql-bi-dev.blogspot.com/2010/06/foreach-loop-container-in-ssis.html
http://www.rad.pasfu.com- Proposed as answer by Jack Nolan Tuesday, November 9, 2010 2:23 PM
- Marked as answer by SqlRockss Tuesday, November 9, 2010 2:30 PM
Monday, November 8, 2010 9:31 PM -
Hi Reza, thanks for ur reply and links but i am trying to open the links and its not showing me any image. i wanna create sample packages so i wanna c the pics in webpage.
Thanks
Tuesday, November 9, 2010 4:50 PM -
Hi Reza, thanks for ur reply and links but i am trying to open the links and its not showing me any image. i wanna create sample packages so i wanna c the pics in webpage.
Thanks
http://www.rad.pasfu.comWednesday, November 10, 2010 6:03 AM