SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)

SQL/MX Language Elements
HP NonStop SQL/MX Release 3.1 Reference Manual663850-001
6-34
Numeric Data Types
In this example, the SQL/MP column of type INTERVAL SECOND(2) TO
FRACTION(1) is interpreted in NonStop SQL/MX as type INTERVAL SECOND(2,1).
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
Example for Extended NUMERIC Precision Data Type
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-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