Skip to main content
Previous section   Next section

ANSIPrecedence

Enable/disable ANSI SQL operator precedence system-wide.

Synopsis

[SQL]    ANSIPrecedence=n

Description

The value n may be 1 or 0:

  • When 1 (true), InterSystems SQL gives the “*”, “\”, “/”, and “#” arithmetic operators higher precedence than the “+”, “-”, and “||” operators. Operators with higher precedence are executed before operators with lower precedence.

  • When 0 (false), InterSystems SQL executes arithmetic expressions in strict left-to-right order. This matches the convention used in ObjectScript.

You can use parentheses to enforce the desired precedence.

Examples

ANSIPrecedence=0

Range of Values

0 or 1. The default is 0

Management Portal

On the page System Administration > Configuration > SQL and Object Settings > General SQL Settings, for the Apply ANSI Operator Precedence setting, choose Yes (true) or No (false).