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

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-31
Numeric Data Types
In general, a FRACTION end field in NonStop SQL/MP is interpreted in NonStop
SQL/MX as though it were the fractional precision of a SECOND field, provided the
start field is SECOND or larger.
Selecting FRACTION-Only INTERVAL Columns
If you attempt to select data from a FRACTION-only INTERVAL column, the column
value is returned as a string of '#' characters with the same display length as the
length of the column.
For example, suppose that an SQL/MP table has an INTERVAL column defined as:
MPIntervalCol INTERVAL FRACTION(6)
DEFAULT INTERVAL '123456' FRACTION(6)
You can select from this column as shown:
SELECT MPIntervalCol FROM MPTable;
MPIntervalCol
-------------
######
######
...
NonStop SQL/MX returns a warning indicating that you selected an unsupported data
type with undefined contents.
Numeric Data Types
Numeric data types are either exact or approximate. A numeric data type is compatible
with any other numeric data type, but not with character, datetime, or interval data
types.
Exact numeric data types are types that can represent a value exactly: NUMERIC,
SMALLINT, INTEGER, LARGEINT, DECIMAL, and PICTURE COMMENT:.
Approximate numeric data types are types that do not necessarily represent a value
exactly: FLOAT, REAL, and DOUBLE PRECISION.
exact-numeric-type is:
NUMERIC [(precision [,scale])] [SIGNED|UNSIGNED]
| SMALLINT [SIGNED|UNSIGNED]
| INT[EGER] [SIGNED|UNSIGNED]
| LARGEINT
| DEC[IMAL] [(precision [,scale])] [SIGNED|UNSIGNED]
| PIC[TURE] [S]{9(integer) [V[9(scale)]] | V9(scale)}
[DISPLAY [SIGN IS LEADING] | COMP]
approximate-numeric-type is:
FLOAT [(precision)]
| REAL
| DOUBLE PRECISION