SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
E-22
Numeric, Date-Time, and Interval Expressions
Numeric, Date-Time, and Interval Expressions
A numeric, date-time, or INTERVAL expression consists or one or more numeric, 
date-time, or INTERVAL operands connected by arithmetic operators, as shown in this 
diagram.
numeric-operand
is a column name (possibly qualified by a correlation name), a literal, a function 
invocation, a host variable, a parameter name, or an expression that evaluates to a 
numeric value.
UNITS field
used after a numeric operand, converts the value of the operand to a value of type 
INTERVAL field; used after a date-time or INTERVAL operand, converts the 
value of the operand to a numeric value that represents the number of units of 
field-type field that are contained in the value.
date-time-operand
is a column name (possibly qualified by a correlation name), a literal, a function 
invocation, a host variable, a parameter name, or an expression that evaluates to a 
date-time value.
operand [ [ arith-operator operand ] ... ]
operand is:
 { [+] numeric-operand [ UNITS field ] }
 { [-] }
 { }
 { date-time-operand }
 { [ [ start-field TO ] end-field ] }
 { [ UNITS field ] }
 { }
 { [+] interval-operand }
 { [-] }
 { [ start-field [(digits)] [ TO end-field] ] }
 { [ UNITS field ] }
[+] is a unary operator
[-]
arith-operator is:
 { ** }
 { * }
 { / }
 { + }
 { - }










