WebSphere Message Brokers
File: ak01050_
Writer: Bill Oppenheimer

Reference topic

This build: July 31, 2007 21:31:10

Rules for ESQL operator precedence

When an expression involves more than one operator, the order in which the expression is evaluated might affect the result. Consider the following example:

SET a = b + c * d;

Under ESQL's precedence rules, c is multiplied by d and the result is added to b. This rule states that multiplication takes precedence over addition, so reordering the expression as follows:

SET a = c * d + b;

makes no difference. ESQL's precedence rules are set out below but it is generally considered good practice to use parentheses to make the meaning clear. The order of precedence is:

  1. Parentheses
  2. Unary operators including unary - and NOT
  3. Multiplication and division
  4. Concatenation
  5. Addition and subtraction

Operations at the same level are evaluated from left to right.

Related concepts
Message flows overview
Message mappings overview
Related tasks
Developing message flows
Developing ESQL
Related reference
Built-in nodes
ESQL reference
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:31:10

ak01050_ This topic's URL is: