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 IC70488 Status: Geschlossen

SUM DOUBLE COLUMN WITH VALUES THAT ARE CLOSE TO ZERO MAY RESULT IN
INTERMEDIATE VALUES SMALLER THAN THE LIMIT RETURNING SQL0802N

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
SUM of a DOUBLE column might return SQL0802N if an intermediate 
floating point calculation returns a value that is 
outside the range for DOUBLE, even though a reasonable result is 
expected. 
 
The following example could reasonably return a SUM of 0, but 
instead 
generates an error. 
 
db2 connect to sample 
db2 "drop table mbj" 
db2 "CREATE TABLE mbj(value INTEGER,number DOUBLE)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, -1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 3.98000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "INSERT INTO mbj VALUES (1, 1.99000000000000E-300)" 
db2 "SELECT SUM(number) FROM mbj" 
 
Since the sum of the negative rows appears to be equivalent to 
the sum 
of the positive rows, a result of zero would be expected. 
 
>db2 "SELECT SUM(number) FROM mbj" 
 
1 
------------------------ 
SQL0802N  Arithmetic overflow or other arithmetic exception 
occurred. 
SQLSTATE=22003 
 
This error might not occur with similar examples against other 
database Servers. 
This behavior is working as designed since double is not a 
precise data type, but we will accommodate requirements from 
applications like SAP and return 0 instead of SQL0802N in this 
scenario when SAP is used. 
 
Workaround: 
 
Cast column to DECFLOAT or DECIMAL: 
db2 "select SUM( DECFLOAT(number)) from mbj" 
or 
Use DECFLOAT or DECIMAL data type instead.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All Platforms                                                * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* SUM DOUBLE COLUMN WITH VALUES THAT ARE CLOSE TO ZERO MAY     * 
* RESULT                                                       * 
* IN INTERMEDIATE VALUES SMALLER THAN THE LIMIT RETURNING      * 
* SQL0802N                                                     * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to v9.7 Fixpack 4 or higher.                         * 
****************************************************************
Local-Fix:
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
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
First fixed in DB2 v9.7 Fixpack 4 or higher.
Workaround
keiner bekannt / siehe Local-Fix
Bug-Verfolgung
Vorgänger  : APAR is sysrouted TO one or more of the following: IC70675 
Nachfolger : 
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
11.08.2010
09.05.2011
09.05.2011
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP4
Problem behoben lt. FixList in der Version
9.7.0.4 FixList