----------  EXPR Clause  ----------

An EXPR represents an expression.  Expressions can appear as  parts  of  other
commands, for instance in the SELECT or UPDATE commands or in a WHERE clause.

Syntax:

EXPR is: |ATTR                              |
         |STRING CONSTANT                   |
         |NUMBER                            |
         |(EXPR)                            |
         |convert EXPR [to] DATATYPE        |
         |convert EXPR [to] generic DATATYPE|
         |EXPR convert to DATATYPE          |
         |EXPR convert [to] generic DATATYPE|
         |EXPR OPERATOR EXPR                |
         |EXPR OPERATOR                     |
         |OPERATOR EXPR                     |
         |BUILT_IN_FUNCTION                 |
         |USER_DEFINED_FUNCTION             |
         |USER_DEFINED_SET_FUNCTION         |
         |SET_FUNCTION                      |
         |MATH_LIBRARY_FUNCTION             |

The OPERATORs are: +        addition of numeric data
                   -        subtraction of numeric data
                   *        product of numeric data
                   /        division of numeric data
                   %        remainder after division of numeric data
                   concat   concatenation of character data
                   day(s)   unary operator convert to days
                   week(s)  unary operator convert to weeks
                   etc.     year(s), month(s), hour(s), minute(s), second(s),
                            yearof, monthof, dayof, hourof, minuteof, secondof

The BUILT_IN_FUNCTIONs are:

          abs()
          ceiling()
          datenext()
          dayname()
          dayofweek()
          dayofyear()
          floor()
          is_decimal()
          is_integer()
          is_white()
          length()
          lpad()
          ltrim()
          lscan()
          nullval()
          round()
          rpad()
          rscan()
          rtrim()
          sign()
          strdel()
          strins()
          substr()
          tolower()
          toupper()
          trunc()
          weekofyear()

A USER_DEFINED_FUNCTION or USER_DEFINED_SET_FUNCTION is a function defined  in
accordance  with the details specified in the "User Definable Features" manual
section.
     The SET_FUNCTIONS are:   count
                              max
                              min
                              sum
                              avg

For further information on set functions, see "Aggregate Functions".

The MATH_LIBRARY_FUNCTIONS available vary with the machine  being  used.  They
will be a subset of the following:

     acos            asin            atan            atan2           ceil
     cos             cosh            erf             erfc            exp
     fabs            floor           fmod            frexp           frexpman
     frexpexp        gamma           hypot           j0              j1
     jn              ldexp           log             log10           modf
     modffrac        modfint         pow             sin             sinh
     sqrt            tan             tanh            y0              y1
     yn
