Operators

Table 45 lists operators in descending order of precedence. Operators listed in the same row within the table have the same precedence (the operators *,/,% are equal in precedence).

Operators of the same precedence are processed in the sequence they appear in the expression, from left to right. Use parentheses to override the normal precedence rules. All numeric types (decimal, float, integer) are supported for all operators.

Table 45. Operators

Operator

Explanation

||

Concatenate two strings or dates

+, -

Sign prefix (positive or negative)

^

Exponent

*, /, %

Multiply, divide, remainder: a % b = mod(a,b) for integers

+, -

Plus, minus

Note: Production Reporting distinguishes between a sign prefix and arithmetic operation by the context of the expression.

>, <, >=, <=, <>, !=, =

Comparison operators: greater than, less than, greater or equal to, less than or equal to, not equal (!= or <>), equal

not

Logical NOT

and

Logical AND

or, xor

Logical OR, XOR (exclusive OR)