An expression is a combination of symbols-identifiers, literals, functions, and operators that yields a single data value.
In Integration Services, expressions can be used:
CASE
statementsExpressions are based on an expression language and the expression evaluator. The expression evaluator parses the expression and determines whether the expression follows the rules of the expression language.
The following elements in Integration Services can use expressions:
The Conditional Split transformation implements a decision structure based on expressions to direct data rows to different destinations.
"Column1 > Column2"
can be routed to a separate output.Column1 + " ABC"
can update a value or create a new value with the concatenated string.Variables use an expression to set their value. For example, GETDATE()
sets the value of the variable to the current date.
Precedence constraints can use expressions to specify the conditions that determine whether the constrained task or container in a package runs.
true
or false
.@A > @B
compares two user-defined variables to determine whether the constrained task runs.The For Loop container can use expressions to build the initialization, evaluation, and incrementing statements that the looping structure uses. For example, the expression @Counter = 1
initializes the loop counter.
The implicit conversion of a data type occurs when the expression evaluator automatically converts the data from one data type to another.
smallint
is compared to an int
, the smallint
is implicitly converted to int
before the comparison is performed.