A.3 Simple Expressions
This section lists various supported expressions.
Arithmetic Expressions
Numeric computations are always done using double values. The following operators are supported:
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
- (Unary) |
Negation |
Comparison Expressions
The expression 'is null' can be used to compare a value to null.
Comparisons can be done between any two values. If the two values have the same type, the comparison is done according to the type. If two values are of different types, then both values are converted to strings and compared using text comparison.
< |
Less than |
> |
Greater than |
<= |
Less than or equal to |
>= |
Greater than or equal to |
= or == |
Equal to |
<> or != |
Not equal |
Logical Expressions
The conditional expressions are all short-circuit
logic operations. In the 'and' expression, the right-hand operand is
only evaluated if the left-hand operand is true. In the 'or' expression,
the right-hand operand is only evaluated if the left-hand operand is
false.
The operands of logic expressions can be any type. If an operand is not
a Boolean value, it is converted to a Boolean. If the value is null,
it is converted to a false value. Otherwise, it is converted to a true
value.
And |
And operation |
Or |
Or operation |
Not |
Logic negation |
| << A.2 Constant Values | © 1996-2013 InetSoft Technology Corporation (v11.5) | A.4 SQL Predicates >> |