Rules and Guidelines for Expressions
Use the following rules and guidelines when you write expressions:
- •For each source field, you can perform a lookup or create an expression. You cannot do both.
- •You cannot use strings in numeric expressions.
For example, the expression 1 + '1' is not valid because you can only perform addition on numeric datatypes. You cannot add an integer and a string.
- •You cannot use strings as numeric parameters.
For example, the expression SUBSTR(TEXT_VAL, '1', 10) is not valid because the SUBSTR function requires an integer value, not a string, as the start position.
- •You cannot mix datatypes when using comparison operators.
For example, the expression 123.4 = '123.4' is not valid because it compares a decimal value with a string.
- •You can pass a value from a field, literal string or number, or the results of another expression.
- •Separate each argument in a function with a comma.
- •Except for literals, the transformation language is not case sensitive.
- •The colon (:), comma (,), and period (.) have special meaning and should be used only to specify syntax.
- •Informatica Cloud tasks treat a dash (-) as a minus operator.
- •If you pass a literal value to a function, enclose literal strings within single quotation marks. Do not use quotation marks for literal numbers. Informatica Cloud tasks treat any string value enclosed in single quotation marks as a character string.
- •Do not use quotation marks to designate fields.
- •You can nest multiple functions within an expression. Informatica Cloud tasks evaluate the expression starting with the innermost function.