For Loop Expressions


For Loop Expressions

The For Loop is a container with three expressions that control the number of times the loop executes. The InitExpression is the first expression to be evaluated on the For Loop and is only evaluated once at the very beginning. It is evaluated before any workflow in the loop is executed and you use it to initialize a variable that will be used in the other expressions. You can also use it to initialize a variable that might be used in the workflow of the loop.

The EvalExpression is the second expression evaluated when the loop first starts and is evaluated before each iteration of the loop. The EvalExpression is the terminating case. If it evaluates to trUE, the loop executes again. If it evaluates to FALSE, the loop terminates.

The AssignExpression is used to increment, decrement, or otherwise modify the variable used in the EvalExpression. This expression is evaluated for each iteration of the loop as well, but at the bottom of the workflow, or, in other words, after the workflow has executed. Figure 9.7 illustrates the order in which the expressions are evaluated.

Figure 9.7. The For Loop uses expressions




Microsoft SQL Server 2005 Integration Services
Microsoft SQL Server 2005 Integration Services
ISBN: 0672327813
EAN: 2147483647
Year: 2006
Pages: 200
Authors: Kirk Haselden

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net