DB2 - Problem description
| Problem IT08045 | Status: Closed |
LAST_VALUE AND OLAP WINDOW OF "N FOLLOWING TO UNBOUNDED FOLLOWIN G" COULD FAIL TO RETURN NULL WHERE WINDOW IS NO LONGER VALID. | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
LAST_VALUE with OLAP window of "n following to unbounded
following" could return a value instead of NULL for rows where
window is no longer valid.
example :
create table minitestr (c1 int, c2 decimal);
insert into minitestr values (24, 28.2735),(25, 25.1320);
select c1, c2, last_value(c2) over
(order by c1 rows between 1 following and unbounded
following)
from minitestr ;
returns:
C1 C2 3
----------- ------- -------
24 28. 25.
25 25. 25.
2 record(s) selected.
but correct result is should have NULL for the last row in the
3rd column:
C1 C2 3
----------- ------- -------
24 28. 25.
25 25. -
2 record(s) selected. | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * OLAP LAST_VALUE * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * install fix. * **************************************************************** | |
| Local Fix: | |
rewrite sql or install this fix. | |
| Solution | |
See Error Description | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 31.03.2015 06.10.2015 06.10.2015 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.11 |
|