DB2 - Problem description
| Problem IT00909 | Status: Closed |
"<TIME_COLUMN> +/- <DECIMAL_COLUMN> SECONDS" MIGHT PRODUCE INCORRECT RESULTS IN COLUMN-ORGANIZED TABLES | |
| product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
| Problem description: | |
Selecting "<TIME_COLUMN> - <DECIMAL_COLUMN> SECONDS" from a
column-organized table will produce incorrect results for rows
where the fractional part of <DECIMAL_COLUMN> is greater than 0
and less than 0.000000000001. Similarly, selecting
"<TIME_COLUMN> + <DECIMAL_COLUMN> SECONDS" from a
column-organized table will produce incorrect results for rows
where the fractional part of <DECIMAL_COLUMN> is less than 0 and
greater than -0.000000000001.
For example, the following SQL statements return a value of
'11:59:59' when it should return a value of '12:00:00'. The
reason it should return a value of '12:00:00' is because SECONDS
in DB2 should be converted to DECIMAL(27,12) allowing a maximum
of 12 digits of fractional seconds to be included. Anything
smaller should be ignored, but is not being ignored for queries
against column-organized tables.
create table table1 (t1 time, d2 decimal(20,13)) in ts1 organize
by column;
insert into table1 values ('12.00.00', 0.0000000000001);
select t1 - d2 seconds from table1; | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * CDE * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Install v10.5 FP4 * **************************************************************** | |
| Local Fix: | |
| available fix packs: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
| Solution | |
Install v10.5 FP4 | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 08.04.2014 15.09.2014 15.09.2014 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.5.0.4 |
|