Using expressions in Control Flow
Expressions provide a level of dynamism in Control Flow. Working with a Control Flow task can be much more robust when properties of the task can be set dynamically instead of having static values.
Prior to SSIS 2012, you could assign the result of an expression to a variable (writing the expression in the variable's expression property and setting the EvaluateAsExpression
property of the variable to true
), but problem with this method is that the value of the variable will be resolved whenever you refer the variable. For example, assume that you have a User::StartTime
variable which gets the current time with the GetDate()
expression function, at the end of package you want to use the User::StartTime
variable to fetch start time of the package and do some calculations, but you will get the current time! This is because the expression will resolve at the time of referring to the variable. So there is a need to specify a step or it makes sense better to say...