This table describes all of the operators available in the Expression Builder window that you use when working with the following:
- Data filters
- Business rules
- Conditional statements
- Attribute transformations
Operator Types
Operators are available for the following types:
- Arithmetic. Performs mathematical equations.
- Comparison. Compares values.
- Logical. Performs operations that resolve to true or false or connects statements.
- Set. Determines if a value is equal to one in a list of values.
- String. Compares and concatenates string values.
Guidelines
When using operators in the Expression Builder, note the following guidelines:
- When you create an expression statement, if you construct the expression to return as TRUE (1) you can then drill down to see the rows that failed.
- To add operators in the Expression Builder, you either click icon buttons or select from the list of expression elements.
- Operators are not case sensitive.
- Operator keywords are added to expressions in blue text.
- When using literal values such as "New York," enclose the value in double quotation marks. Attribute names and numeric values do not require quotation marks. Any numeric value enclosed in quotation marks, such as "123" will be read as a literal value.
- When using the Expression Builder in a Quality project, note the following:
- Do not select "IF" to specify a condition. The "IF" part of the syntax is automatically generated.
- There are a maximum of 100 nested IFs allowed in IF/ELSE conditional statements. Adding multiple IF operators to the top level of a single conditional section is not supported. Include only one top-level IF (head-if) per section.
Operator Descriptions
The following table includes operator descriptions, syntax, and examples of use. Click the icon to view syntax and examples.
Operator Name | Description |
---|---|
Arithmetic | |
- | Subtract to find the difference of |
* | Multiplied by |
/ | Divided by |
+ |
Sum of Note: For the Transformer process, you can select the Use Legacy Plus
Operator option on the Transformer Configuration Output Settings
window to use the plus operator (+) to concatenate multiple arguments
(strings, attributes, and integers) with no space between each argument.
This option is to be used only for backwards compatibility with
Quality projects created in pre-v15 versions of TSS.
|
Comparison | |
< | Less than |
<= | Less than or equal to |
!=, <> | Not equal to |
= | Is equal to |
> | Greater than |
>= | Greater than or equal to |
Logical | |
AND |
A conjunction between two statements. Both statements must be true for the conjunction to be true.
|
IF, THEN, ELSE |
Logical condition operators. The ELSE statement is optional. When using the Expression Builder inside a Quality project, do not select "IF" to specify a condition. The "IF" part of the syntax is automatically generated.
|
IF, THEN, ELSE IF, THEN, ELSE |
Logical condition operators. Syntax is similar to the IF, THEN, ELSE logical statement.
|
NOT |
Reverses the truth value of the statement that follows, resulting in the opposite of the statement it evaluates.
|
OR |
An inclusive disjunction between two statements. At least one statement must be true for the disjunction to be true.
|
Set | |
IN |
Tests whether a value is equal to a value in a list.
|
String | |
LIKE |
Comparison operator that searches for a value that matches a specified pattern.
|
|| |
Concatenates multiple arguments (such as strings, attributes, and integers) with no space between each argument.
|
|: |
Concatenates multiple arguments (such as strings, attributes, and integers) with a space between each argument.
|