Linux ODBC/MX Client Driver for SQL/MX Release 3.2 (H06.25+, J06.14+)
Table 12 Sample values retrieved by the application (continued)
Fraction value retrieved by the
applicationColumn type
Value in the column of the SQL/MX
Table
987000000timestamp(3) or time(3)0.987
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 applications can insert the time and timestamp values into the time and timestamp
columns of 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 13 (page 31) includes a sample set of FRACTION_STRUCT field values when SQL Fraction
Precision Value: is set to 6 or 9.
Table 13 FRACTION_STRUCT 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 MXODSN file. The following example
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 31










