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 the SemQL language but will fail at execution-time.
|
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, returns true if one value matches. |
||
|
Greater than or equal to value_1 and less than or equal to value_2 |
||
|
TRUE if value matches the pattern. Within the pattern, the character |
||
|
Returns true if the expression matches the pattern.
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 true if any of child records - in a one to many relationship - meet the given condition. For more information, see use attributes of related entities. |
||
|
Condition that returns true if all of child records - in a one to many relationship - meet the given condition. For more information, see use attributes of related entities. |
||
|
Condition that returns true if the two values are equal or one of them is null. |
||
|
Condition that returns true if the two values are equal or both are null. |