Table of Contents

Search

  1. Preface
  2. Data integration tasks
  3. Mapping tasks
  4. Dynamic mapping tasks
  5. Synchronization tasks
  6. Data transfer tasks
  7. Replication tasks
  8. Masking tasks
  9. Masking rules
  10. PowerCenter tasks

Tasks

Tasks

Rules and guidelines for expressions

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 data types. 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 data types 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.
  • Data integration 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. Data integration 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. Data integration tasks evaluate the expression starting with the innermost function.
  • When you use a parameter in an expression, use the appropriate function to convert the value to the necessary data type. For example, you might use the following expression to define a quarterly bonus for employees:
    IIF((EMP_SALES < TO_INTEGER($$SalesQuota), 200, 0)

0 COMMENTS

We’d like to hear from you!