Entering content frame

Syntax documentation Selecting Data Records Locate the document in the library structure

When you import application data, you can select the data records to be imported according to their content.

The conditions defined here can be negated with NOT, linked with AND and OR, and bracketed arbitrarily. The Loader evaluates the operators accordingly.

Syntax

<if_condition>     ::= IF <condition>

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

<simple_condition> ::= POS <field_spec> <field_type> [HEX] <compare_operator> '<literal>'

<compare_operator> ::= < | > | = | <= | >= | !=

field_spec

Position description

field_type

Data types

HEX

You can define HEX values.

literal

Literal used as comparison value

See the SQL Reference Manual, Structure linkLiteral (literal)

Examples

Example

IMPORT TABLE hotel.room
  
IF POS 06-11 = 'double'
  DATA INSTREAM 'room_fwv.data' FWV
    hno     01-05
    type    06-11
    free    12-15
    price   16-22

You only import those data records from the room_fwv.data source data stream into the ROOM table in which double is specified as the room type.

Explanation

The Loader distinguishes between compound conditions and simple conditions (simple_condition). Only those records to which the compound or simple condition applies are imported.

Compound Conditions

Conditions can be negated with NOT , combined with AND and OR to form compound conditions, and bracketed as you want.

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.

Simple Conditions

You use the simple condition simple_condition to define the selection criterion that determines which records from the data stream are imported to which target table. The data records that you want to import are selected by comparing them to a constant.

<field_spec>

As with the other fields in a data record, you use the position of a value that you want to compare to describe it.

<field_type>

The data type only has to be specified if the affected data field is to be read or output with a data type other than CHAR. Every internal database column format in the database can be read and output in CHAR format.

<literal>

The literal specified is a constant, which is used as a comparison value. You specify a literal as a plain text value and place it in single quotation marks. This value is converted to the data type of the value that you want to compare in the data record.

If the literal you want to use as a comparison value is a number, it must have a valid number format. That is, it must be a floating point number in mantissa/exponent notation or a fixed-point number with the currently defined decimal representation or the default decimal representation in the Loader.

See also:

IMPORT TABLE Command

IMPORT COLUMNS Command

UPDATE COLUMNS Command

 

Leaving content frame