Open System Services ODBC/MX Client Driver for SQL/MX Release 3.2 (H06.25+, J06.14+)

Table 25 Sample Values Retrieved Using a C/C++ Program and Their Corresponding Expected
Values in Nanosecond (continued)
Value in the Fraction of the Client
ProgramColumn Type
Value in the Column of the SQL/MX
Table
87000000timestamp(3) or time(3)0.087
8000000timestamp(3) or time(3)0.008
0timestamp(3) or time(3)0.000
980000000timestamp(2) or time(2)0.98
90000000timestamp(2) or time(2)0.09
0timestamp(2) or time(2)0.00
900000000timestamp(1) or time(1)0.9
0timestamp(1) or time(1)0.0
NOTE: The OSS ODBC/MX programs can insert the time and timestamp values into the time
and timestamp columns of an SQL/MX table using the FRACTION_STRUCT structure. The structure
fields are:
struct FRACTION_STRUCT {
SQLUINTEGER day,
SQLUINTEGER hour,
SQLUINTEGER minute,
SQLUINTEGER second,
SQLUINTEGER fraction
};
Table 26 Fraction field values with SQL Fraction Precision Value: set to 6 or 9.
123456
Table
Precision/
Fraction
112123123412345123456123456
11212312341234501234512345
1121231234012340012341234
112123012300123000123123
11201200120001200001212
1010010001000010000011
You can set The SQL Interval Value Insertion property for Interval data type behavior
to be the same as MSDN behavior. You must set this property in ODBCDSN file. The following
examples illustrates an insert into a column of type INTERVAL DAY TO SECOND:
If this property is set to the default, SYSTEM_DEFAULT, inserting 02 11:21:12.123, which is
bound to the default data type, SQL_CHAR, is inserted as 02 11:21:12.123000.
If the SQL Interval Value Insertion property is set to MSDN_DEFAULT, 02
11:21:12.000123 is inserted.
Timestamp Values with Fraction 45