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) |