SQL/MX Comparison Guide for SQL/MP Users

DML Features
HP NonStop SQL/MX Comparison Guide for SQL/MP Users523735-003
3-2
Interval Data Type
SELECT MPDateTimeCol FROM MPTable;
MPDateTimeCol
-------------
...
03-12
...
Selecting FRACTION-Only DATETIME Columns
If you attempt to select data from a FRACTION-only DATETIME column, the value is
returned as a string of '#' characters with the same display length as the length of the
column.
Suppose that an SQL/MP table has a DATETIME column defined as:
MPDateTimeCol DATETIME FRACTION(6)
DEFAULT DATETIME '123456' FRACTION(6)
You cannot select the data from this column. For example:
SELECT MPDateTimeCol FROM MPTable;
MPDateTimeCol
-------------
######
######
...
NonStop SQL/MX returns a warning indicating that you selected an unsupported data
type with undefined contents. However, if you try to use the unsupported data type in
any sort of expression, NonStop SQL/MX returns an error.
The SQL/MP DATETIME columns that do not map to standard SQL/MX types are
represented as SQL/MP DATETIME types in NonStop SQL/MX. These types are listed
in Table 3-1.
In embedded SQL, the method for declaring input and output host variables with
date-time data types for NonStop SQL/MX is different from the SQL/MP method. See
Section 4, Embedded SQL for more information about host variables.
Interval Data Type
NonStop SQL/MX supports the SQL:1999 INTERVAL data type. NonStop SQL/MX
recognizes the nonstandard FRACTION keyword used in NonStop SQL/MP and maps
it to the equivalent fractional portion of the standard SECOND field. However, it does
not support interval data types with a start field of FRACTION.