Library /sys$common/syshlp/CDO$HELP.HLB  —  Expressions  precedence_ordering
    The following list shows the order in which Oracle CDD/Repository
    interprets symbols used in an expression:

    1. (symbols)

       Any field contained in parentheses.

    2. *  /

       Multiplication and division symbols.

    3. +

       Addition and subtraction symbols.

    4. <  >  <=  >=  =  <>

       Relational operators. See Expressions relational_operators for
       more information.

    5. NOT

       Logical operator.

    6. AND

       Logical operator.

    7. OR

       Logical operator.

    Relational Operators Equivalent Symbols shows equivalent symbols
    for the relational operators shown in the Precedence Ordering
    within Expressions table.

    Table 5-1 Relational Operators Equivalent Symbols

    Relational  Equivalent
    Operator    Symbol       Meaning

    <           LT           Less than
    >           GT           Greater than
    <=          LE           Less than or equal to
    >=          GE           Greater than or equal to
    <>          NE           Not equal to

    In general, CDO evaluates expressions from left to right. When
    an expression contains parentheses or operators, CDO evaluates
    these operations first. The following list shows the order of
    precedence for these symbols, from highest to lowest:

    o  A symbol or symbols within parentheses

    o  Multiplication or division symbols

    o  Addition or subtraction symbols

    o  Relational operators: LT, GT, LE, GE, EQ, NE

    o  NOT

    o  AND

    o  OR

    In the following example, the order of precedence determines that
    the first expression evaluates to 3, while the second expression
    evaluates to 8.

    (6 + 12)/6 = 3
    6 +  12/6 = 8

    In the following expression, CDO evaluates X as a value between 2
    and 4 or 11 and 20.

    IF (X GE 2 AND X LE 4) OR (X GE 11 AND X LE 20) THEN 1 ELSE 0
Close Help