Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC92697 Status: Geschlossen

DB2 MIGHT PRODUCE INCORRECT RESULT WHEN EXECUTING A QUERY WITH DATETIME
PREDICATES

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
DB2 might produce incorrect result when executing a query with 
datetime predicates. 
The incorrect result will only happen if the table has a 
timestamp of the form 'YYYY-DD-MM:HH:MM:SS:24.00.00.000000' 
 
 
db2 "create table tablexyz (ts TIMESTAMP DEFAULT 
'2999-12-31-24.00.00.000000')" 
 
db2 "insert into tablexyz values ('2999-12-31-24.00.00.000000')" 
 
 
db2 "select * from tablexyz" 
 
TS 
-------------------------- 
2999-12-31-24.00.00.000000 
 
  1 record(s) selected. 
 
Example 1: 
db2 "select * from tablexyz where date(ts) = '2999-12-31'" 
 
ts 
-------------------------- 
 
  0 record(s) selected. 
 
Example 2: 
db2 "select * from tablexyz where year(ts) = 2999" 
 
TS 
-------------------------- 
 
  0 record(s) selected. 
 
Example 3: 
db2 "select * from tablexyz where year(ts) = 2999 and month(ts) 
= 12" 
 
TS 
-------------------------- 
 
  0 record(s) selected.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.1 and Fix Pack 3                   * 
****************************************************************
Local-Fix:
Workaround: Manually rewrite the predicate from date/year to 
timestamp format. 
Example1. 
select * from tablexyz where ts >= 
'2999-12-31-00.00.00.000000' and ts <= 
'2999-12-31-24.00.00.000000' 
 
example 2. 
select * from tablexyz where ts >= 
'2999-01-01-00.00.00.000000' and ts <= 
'2999-12-31-24.00.00.000000' 
 
select * from tablexyz where ts >= 
'2999-12-01-00.00.00.000000' and ts <= 
'2999-12-31-24.00.00.000000'
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Lösung
Problem was first fixed in DB2 Version 10.1 and Fix Pack 3
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC95380 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
31.05.2013
27.09.2013
27.09.2013
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.3 FixList
10.1.0.3 FixList