DTRHELP.HLB  —  Boolean Expressions, Relational Operators
       Relational operators compare value expressions, check whether a
       code string is contained in a table, and check whether a record
       stream is empty or not. Most Boolean expressions contain a field
       name, a relational operator, and a value expression.

       The relational operators are:

       o  EQUAL

       o  NOT EQUAL

       o  CONTAINING

       o  NOT CONTAINING

       o  STARTING WITH

       o  GREATER THAN

       o  GREATER EQUAL

       o  LESS THAN

       o  LESS EQUAL

       o  BETWEEN

       o  MISSING

       o  NOT MISSING

       o  IN table-name

       o  NOT IN table-name

       o  ANY

       o  NOT ANY

       o  AFTER

       o  BEFORE

       The STARTING WITH relational operator is designed to work on text
       strings and can give inconsistent results when used with numeric
       fields.

       When handling character string literals, DEC DATATRIEVE considers
       lowercase letters to have a greater value than uppercase letters.
       Within each case, however, DEC DATATRIEVE sorts the letters
       alphabetically, and considers the letters near the beginning of
       the alphabet to be smaller than those near the end. Consequently,
       "ALBIN" is less than "AMERICAN."

       The order and value associated with alphanumeric characters is
       determined by the ASCII collating sequence. Lowercase letters
       have a higher ASCII value than uppercase letters. See the OpenVMS
       documentation for more information on the DEC Multinational
       Character Set, which includes the ASCII character set.

       In Boolean expressions using the relational operator CONTAINING,
       the comparison of the value expression and the field value is
       case insensitive. The comparison is case insensitive regardless
       of whether you enclose a character string literal within
       quotation marks.

       The following examples show how to use relational operators that
       compare field values to value expressions:

       DTR> FIND YACHTS WITH BEAM EQ 9,10,14
       [50 records found]
       DTR> PRINT CURRENT WITH RIG NE "SLOOP"

                                      LENGTH
                                       OVER
       MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

        EASTWARD    HO         MS      24     7,000  09  $15,900
        FISHER      30         KETCH   30    14,500  09
        GRAMPIAN    34         KETCH   33    12,000  10  $29,675

       The last PRINT statement can be written with the value expression
       preceding the field name. DEC DATATRIEVE displays the same
       records:

       DTR> PRINT CURRENT WITH "SLOOP" NE RIG

                                      LENGTH
                                       OVER
       MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

        EASTWARD    HO         MS      24     7,000  09  $15,900
        FISHER      30         KETCH   30    14,500  09
        GRAMPIAN    34         KETCH   33    12,000  10  $29,675
Close Help