![]() Previous |
![]() Next |
You use comparison and logical operators to make expressions in much the same way as arithmetic operators. Each operator has a priority that determines its order of evaluation. Operators of equal priority are evaluated left to right, unless parentheses change the order of evaluation. However, the evaluation is halted when the truth value is decided.
Table: Comparison and Logical Operators shows the OLAP DML comparison operators and logical operators (AND
, OR
, and NOT
). It lists the operator, the operations, example, and priority where priority is the order in which that operator is evaluated. Operators of the same priority are evaluated from left to right.
Comparison and Logical Operators
Operator | Operation | Example | Priority |
---|---|---|---|
|
Returns opposite of |
|
1 |
|
Equal to |
|
2 |
|
Not equal to |
|
2 |
|
Greater than |
|
2 |
|
Less than |
|
2 |
|
Greater than or equal to |
|
2 |
|
Less than or equal to |
|
2 |
|
Is a date in a time period? |
|
2 |
|
Does a text value match a specified text pattern? |
|
2 |
|
Both expressions are true |
|
3 |
|
Either expression is true |
|
4 |