|
How to: |
|
Reference: |
A logical expression determines whether a particular condition is true. There are two kinds of logical expressions: relational and Boolean. The entities to be compared determine the kind of expression used:
You can use a logical expression to assign a value to a numeric field. If the expression is true, the field receives the value 1. If the expression is false, the field receives the value 0.
The following is a list of common operators used in logical expressions. For information on relational operators and additional operators available for record selection using WHERE and IF, see Selecting Records for Your Report.
|
Operator |
Description |
|---|---|
EQ |
Returns the value TRUE if the value on the left is equal to the value on the right. |
NE |
Returns the value TRUE if the value on the left is not equal to the value on the right. |
GE |
Returns the value TRUE if the value on the left is greater than or equal to the value on the right. |
GT |
Returns the value TRUE if the value on the left is greater than the value on the right. |
LE |
Returns the value TRUE if the value on the left is less than or equal to the value on the right. |
LT |
Returns the value TRUE if the value on the left is less than the value on the right. |
AND |
Returns the value TRUE if both operands are true. |
OR |
Returns the value TRUE if either operand is true. |
NOT |
Returns the value TRUE if the operand is false. |
CONTAINS |
Contains the specified character strings. |
OMITS |
Omits the specified character strings. |
IS MISSING |
Returns the value TRUE if the field is missing. |
IS-NOT MISSING |
Returns the value TRUE if the field is not missing. |
Any of the following are valid for a relational expression:
value {EQ|NE} value value {LE|LT} value value {GE|GT} valuecharacter_value {CONTAINS|OMITS} character_valuewhere:
Either of the following is valid for a Boolean expression:
(relational_expression) {AND|OR} (relational_expression)
NOT (logical_expression)
where:
| WebFOCUS | |
|
Feedback |