home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
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 IC85953 Status: Geschlossen

"DB2 -A" RETURNS UNEXPECTED SQLSTATE WHEN AN ADJUSTMENT WAS MADE
TO THE INVALID DATE CALCULATED USING DATE() WITH LITERAL VALUE.

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
If we force to calculate an impossible date like 02/30/2012, it 
will be adjusted to 02/29/2012 and the warning with SQLSTATE 
01506 should be returned. (Note that 2012 is a leap year.) 
 
SQLSTATE 01506: An adjustment was made to a DATE or TIMESTAMP 
value to correct an invalid date resulting from an arithmetic 
operation. 
 
For example: 
$ db2 conect to sample 
 
$ date 
Fri Aug 17 05:11:20 EDT 2012 
 
$ db2 -a "values date('08/17/2012') + 13 day - 6 month" 
 
1 
---------- 
02/29/2012 
 
  1 record(s) selected. 
 
 
SQLCA Information 
 
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: 0   sqlerrml: 0 
 sqlerrmc: 
 sqlerrp : SQLRI01F 
 sqlerrd : (1) -2147221503      (2) 1                (3) 0 
           (4) 0                (5) 0                (6) 0 
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6) 
           (7)      (8)      (9)      (10)       (11) 
 sqlstate: 00000 --> This should be 01506. 
 
However, if we use "current date", the warning is returned 
properly. 
 
$ db2 -a "values date(current date) + 13 day - 6 month" 
 
1 
---------- 
02/29/2012 
 
  1 record(s) selected. 
 
 
SQLCA Information 
 
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: 0   sqlerrml: 0 
 sqlerrmc: 
 sqlerrp : SQL09074 
 sqlerrd : (1) 0                (2) 0                (3) 0 
           (4) 0                (5) 0                (6) 0 
 sqlwarn : (1) W    (2)      (3)      (4)        (5)       (6) 
           (7) W    (8)      (9)      (10)       (11) 
 sqlstate: 01506
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to Version 9.7 FixPack 8                             * 
****************************************************************
Local-Fix:
Not available
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
Problem was first fixed in DB2 UDB Version 9.7 FixPack 8
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC86013 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
17.08.2012
09.04.2013
09.04.2013
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP8
Problem behoben lt. FixList in der Version
9.7.0.8 FixList