Symbolic operators require parentheses
To avoid problems with operator precedence on a database, all symbolic operators must be enclosed in parentheses. For example, use parentheses around an arithmetic expression, such as ($P0 + $P1). Do not use $P0 + $P1. The only exception to this rule is operators that return Boolean values such as =, <, and >.
The operators NOT, AND, and OR should also be enclosed in parentheses. For example, use ($P0 IS NULL AND $P1 IS NOT NULL), not $P0 IS NULL AND $P1 IS NOT NULL.
You also need parentheses in function mappings that use such operators, regardless of whether you are mapping an Actuate SQL function or operator.
You do not need parentheses if the template already contains the equivalent of parentheses, for example the parentheses of a function or the commas that separate operands.

Additional Links:

Copyright Actuate Corporation 2012