SemQL operators
Operators in SemQL modify, combine, or compare expressions.
Operators in SemQL are used to:
-
Combine expressions to create new expressions (arithmetic or character operators).
-
Evaluate expressions to return a boolean value. Such operators are used to create conditions.
Arithmetic operators
The following table lists the arithmetic operators available in SemQL.
Operator | Description |
---|---|
|
Addition |
|
Subtraction |
|
Multiplication |
|
Division |
Character operators
The double pipe (||
) is used for string concatenation.
In SQL Server, the || operator is automatically rewritten to the database + operator. Using + also works but is not recommended. Note that concatenation and most operators in SQL Server do not do implicit type conversion, so concatenating two attributes with incompatible types will raise no issue for the SemQL language but will fail during execution.
|
Comparison operators
The following table lists the comparison operators available in SemQL.
Operator | Description | ||
---|---|---|---|
|
Equality |
||
|
Inequality |
||
|
Greater than, greater than or equal |
||
|
Smaller than, smaller than or equal |
||
|
Compares a value with each value in the list and returns |
||
|
Greater than or equal to value_1 and less than or equal to value_2 |
||
|
|
||
|
Returns
The parameter value may contain one or more of the following options:
This function behaves differently depending on the data location database technology:
|
||
|
Tests for nulls |
||
|
Condition that returns |
||
|
Condition that returns |
||
|
Condition that returns |
||
|
Condition that returns |