Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions
  8. Creating Custom Functions
  9. Custom Function API Reference

Transformation Language Reference

Transformation Language Reference

Arithmetic Operators

Arithmetic Operators

Use arithmetic operators to perform mathematical calculations on numeric data.
The following table lists the arithmetic operators in order of precedence in the transformation language:
Operator
Meaning
+, -
Unary plus and minus. Unary plus indicates a positive value. Unary minus indicates a negative value.
*, /, %
Multiplication, division, modulus. A modulus is the remainder after dividing two integers. For example, 13 % 2 = 1 because 13 divided by 2 equals 6 with a remainder of 1.
+, -
Addition, subtraction.
The addition operator (+) does not concatenate strings. To concatenate strings, use the string operator ||. To perform arithmetic on date values, use the date functions.
If you perform arithmetic on a null value, the function returns NULL.
When you use arithmetic operators in an expression, all of the operands in the expression must be numeric. For example, the expression
1 + '1'
is not valid because it adds an integer to a string. The expression
1.23 + 4 / 2
is valid because all of the operands are numeric.
The transformation language provides built-in date functions that let you perform arithmetic on date/time values.

0 COMMENTS

We’d like to hear from you!