Previous Topic: WHERE ClauseNext Topic: Comparison Expression


Conditional Expression

Purpose

The conditional expression of the WHERE clause is used when the process command syntax specifies lr-conditional-expression.

Syntax

                 ┌───────────── AND ────────────────┐
                 ├───────────── OR ─────────────────┤
►►──┬─────────┬──▼─┬─ dba-designated-keyword ──────┬┴──┬─────┬────────────────►◄
    └─ NOT ( ─┘    └─┬───────┬─┬─ lr-comparison ──┬┘   └─ ) ─┘
                     └─ NOT ─┘ └─ test-condition ─┘

Syntax: Logical Record Expression          

       ┌───────────── AND ────────────────┐
                 ├───────────── OR ─────────────────┤
►►──┬─────────┬──▼─┬─ dba-designated-keyword ──────┬┴──┬─────┬────────────────►◄
    └─ NOT ( ─┘    └─┬───────┬─┬─ lr-comparison ──┬┘   └─ ) ─┘
                     └─ NOT ─┘ └─ test-condition ─┘

►►─┬─┬─ comparison-value ──────┬── operator ──┬─ comparison-value ──────┬─┬───►◄
   │ └─ arithmetic-expression ─┘              └─ arithmetic-expression ─┘ │
   │                                                                      │
   └─ comparison-value ─┬─ CONTAINS ─┬─ comparison-value ─────────────────┘
                        └─ MATCHES ──┘

Parameters

NOT

Specifies that the opposite of the condition fulfills the test requirements.

The opposite of the entire conditional expression can be specified by enclosing the expression in parentheses and preceding it with NOT.

dba-designated-keyword

Specifies a keyword, defined in the subschema by the database administrator (DBA), that directs LRF to a particular logical record path. The selected path must be associated with the object logical record.

lr-comparison

Specifies a comparison expression that establishes criteria used to select occurrences of the object logical record.

Syntax for the comparison expression is shown later in this chapter.

test-condition

Specifies a condition to be tested, such as command status or cursor position.

AND

Specifies that the expression is true only if the outcome of both of the conditions being tested is true.

OR

Specifies that the expression is true if the outcome of either one or both of the conditions being tested is true.

More information:

Conditional Expressions