Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Using Expressions and Operators : Relational Operators

Relational Operators
Comparison Operators
This table shows the operators that the rules language uses for making comparisons:
You cannot substitute the keyword NOT for the not sign (¬) symbol.
Use only in selection criteria statements, not in condition statements.
The only permissible syntax for use with NOT (¬) is: WHERE NOT(fieldname LIKE 'value').
Semantic Data Type and Syntax Validations
Note the following points about semantic data types and syntax in expressions containing these operators:
The relational operators for equality and inequality (=, ¬=) can be used with any two operands of the same semantic data type. They can also be used for two operands of different semantic data types if one of the operands is typeless or if the types are identifier and string, or identifier and count.
The relational operators for ordering (<, <=, >, >=) cannot be used with an operand of type logical. Otherwise, they can be used with two operands with the same semantic data type or if one operand is typeless.
The relational operator for pattern matching (LIKE) can be used with any semantic data types and always returns a logical value.
Trailing blanks are significant for variable-length strings, but not for fixed-length strings. For example, comparing two fixed-length strings with lengths 12 and 16 gives the same result as if the shorter string were extended to length 16 and padded with four blanks on the right.
The LIKE relational operator is not case sensitive if you are matching syntax C data. In all other cases, the other relational operators distinguish between upper and lowercase.
Equality Relational Operators
The relational operators for equality and inequality are = and ¬=. The following chart shows the semantic types on which you can use these operators. In each case, the result of the relational operation is a logical value. Y indicates a valid operation.
Ordering Relational Operators
The relational operators for ordering are <, >, <=, and >=. The following chart shows the semantic data types on which you can use these operators. In each case the result of the relational operation is a logical value. Y indicates a valid operation.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved