DB2 - Problembeschreibung
Problem IC87762 | Status: Geschlossen |
QUERY MIGHT FAIL WITH SQL0901N - BAD PLAN, UNRESOLVED QNC FOUND | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
Under rare scenarios, DB2 might return a SQL0901N error message if the following conditions are satisfied: Scenario 1: 1. Query has an OR predicate 2. One of the subterms contains a complex expression with a negation. eg. NOT CAST (cast('abcd' as CHAR(188)) AS CHARACTER (188)) >= TRANSLATE(CAST (cast('xyz' as CHAR(87)) AS CHAR (87))) Scenario 2: 1. The query has a case expression as one of the output columns 2. The case expression contains a complex expression with a negation. eg. SELECT CASE WHEN NOT CAST (cast('abcd' as CHAR(188)) AS CHARACTER (188)) >= SUBSTR (CAST (cast('xyz' as CHAR(87)) AS CHAR (87)), 82, 1) THEN c1 ELSE c1 end from t1; Error Message: SQL0901N: Bad Plan; Unresolved QNC found Stack: sqlng_process_parse_tree_node sqlng_process_BF_node sqlng_process_parse_tree_node sqlng_process_BF_node sqlng_process_parse_tree_node sqlng_process_BF_node sqlng_walk_BF_chain sqlng_build_thread sqlng_build_TA_op sqlng_process_f_iscan sqlng_process_fetch_op | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Please upgrade to DB2 version 970 fixpack 8 * **************************************************************** | |
Local-Fix: | |
Manually rewrite the query to perform De Morgan's Law | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 version 970 fixpack 8 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC89439 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 01.11.2012 01.04.2013 01.04.2013 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.0 | |
Problem behoben lt. FixList in der Version | |
9.7.0.8 |