home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT05376 Status: Closed

QUERY MIGHT RETURN INCORRECTLY SORTED ROWS.

product:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problem description:
Complex query might return incorrectly sorted rows in situation 
when following conditions are met: 
 
- there is DISTINCT clause in the top SELECT of a query; 
- there is ORDER BY and/or FETCH FIRST n ROWS ONLY clause. 
 
Query snippet: 
 
SELECT DISTINCT ... 
FROM ... 
WHERE ... = ( SELECT ...) 
ORDER BY ... 
 
This query might return incorrect results.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 Version 10.1 and Fix Pack 5                   * 
****************************************************************
Local Fix:
SELECT DISTINCT should be separated from the ORDER BY: 
 
Query snippet: 
 
SELECT * 
 FROM ( 
  SELECT DISTINCT ... 
  FROM ... 
  WHERE ... = ( SELECT ... ) 
 ) 
ORDER BY...
Solution
Problem was first fixed in DB2 Version 10.1 and Fix Pack 5
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
05.11.2014
16.07.2015
16.07.2015
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
10.1.0.5 FixList