Entering content frame

 Condition 

Syntax Rules for Table Descriptions

Syntax

<condition> ::= <simple_condition > | (<condition>) | <condition> AND <condition>
| <condition> OR <condition> | NOT <condition>

Use

The Loader distinguishes between simple conditions and compound conditions. Simple conditions can be negated with NOT, combined with AND and OR to form compound conditions, or encapsulated as required.

Operators in parentheses are evaluated before those that are not in parentheses.

If no operators are in parentheses, the Loader weights them as follows:

·         NOT takes precedence over AND and OR

·         AND takes precedence over OR

·         If the weighting is identical, the operators are evaluated from left to right.

Only those records to which the simple or compound condition applies are loaded.

See also:

Selecting Data Records

You want to load only those data records from the data stream hotel.data where the place is  BERLIN and the price is less than 400.00 to the destination table hotel:

DATALOAD TABLE hotel
  IF POS 41-44 REAL < '400,00'
  AND
     POS 27-36 = 'BERLIN'
       hno     01-04 INTEGER
       name    09-18
       zip     20-25 DECIMAL
       place   27-36
       price   41-44 REAL
INFILE 'hotel.data' FORMATTED

 

Leaving content frame