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 IT34347 Status: Closed

MONTHS_BETWEEN FUNCTION IN NPS MODE RETURN NEGATIVE

product:
DB2 FOR LUW / DB2FORLUW / B50 - DB2
Problem description:
When SQL_COMPAT=NPS, the MONTHS_BETWEEN should return negative
value to align with Netezza behaviour.

The other xxxxx_BETWEEN functions should all return positive
values with exception of MONTHS_BETWEEN when SQL_COMPAT=NPS
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* SQL_COMPAT=NPS                                               *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Apply v11.5 Mod 6 Fixpack 0                                  *
****************************************************************
Local Fix:
Add optimization guideline or profile documented below.

select  MONTHS_BETWEEN('2016-07-31','2017-04-30')
from sysibm.sysdummy1
limit 1
/* 



*/;

There are multiple methods to implement this see docs
(https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.i
bm.db2.luw.admin.perf.doc/doc/c0024522.html) for details. The
example above appends the profile to the end of the SQL
statement.
Solution
Workaround
****************************************************************
* USERS AFFECTED:                                              *
* SQL_COMPAT=NPS                                               *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Apply v11.5 Mod 6 Fixpack 0                                  *
****************************************************************
Comment
Upgrade server to v11.5 Mod 6 Fixpack 0
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
24.09.2020
21.06.2021
21.06.2021
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)