SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-48
Numeric Value Expressions
------------ ---------------------
1000 1355 02:58:57.087086
2000 1264 02:43:57.087086
2500 1111 02:13:57.087086
3000 1172 03:03:57.087086
4000 1172 00:58:57.087086
5000 1165 01:48:55.975986
--- 6 row(s) selected.
Numeric Value Expressions
Considerations for Numeric Value Expressions
Examples of Numeric Value Expressions
The operands of a numeric value expression can be combined in specific ways with
arithmetic operators. In this syntax diagram, the data type of a term, factor, or numeric
primary is numeric.
As shown in the preceding syntax diagram, numeric value expressions are built from
operands that can be:
Numeric literals
Column references with numeric values
numeric-expression is:
numeric-term
| numeric-expression + numeric-term
| numeric-expression - numeric-term
numeric-term is:
numeric-factor
| numeric-term * numeric-factor
| numeric-term / numeric-factor
numeric-factor is:
[+|-] numeric-primary
| [+|-] numeric-primary ** numeric-factor
numeric-primary is:
unsigned-numeric-literal
| column-reference
| numeric-type-host-variable
| dynamic parameter
| numeric-value-function
| aggregate-function
| sequence-function
| scalar-subquery
| CASE-expression
| CAST-expression
| (numeric-expression)