Sql interval behaviour property, Sql interval – HP Integrity NonStop H-Series User Manual
Page 46

Table 14 Sample values retrieved by the application (continued)
Fraction value retrieved by the
application
Column type
Value in the column of the SQL/MX
Table
987000000
timestamp(3) or time(3)
0.987
87000000
timestamp(3) or time(3)
0.087
8000000
timestamp(3) or time(3)
0.008
0
timestamp(3) or time(3)
0.000
980000000
timestamp(2) or time(2)
0.98
90000000
timestamp(2) or time(2)
0.09
0
timestamp(2) or time(2)
0.00
900000000
timestamp(1) or time(1)
0.9
0
timestamp(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
};
includes a sample set of FRACTION_STRUCT field values when SQL Fraction
Precision Value:
is set to 6 or 9.
Table 15 FRACTION_STRUCT field values with SQL Fraction Precision Value: set to 6
or 9.
1
2
3
4
5
6
Table
precision/
fraction
1
12
123
1234
12345
123456
123456
1
12
123
1234
12345
012345
12345
1
12
123
1234
01234
001234
1234
1
12
123
0123
00123
000123
123
1
12
012
0012
00012
000012
12
1
01
001
0001
00001
000001
1
SQL Interval Behaviour property
The SQL Interval Behaviour property includes zeroes at the beginning or end of an interval
datatype for micro or nano seconds. The SQL Interval Behaviour has two values:
•
SYSTEM_DEFAULT
— Trailing zeroes are added to the fraction. For example, 0.1234 changes
to 0.123400.
•
MSDN_DEFAULT
— Leading zeroes are added to the fraction. For example, 0.1234 changes
to 0.001234.
46
Compatibility and considerations