DB2 - Problembeschreibung
| Problem IC89439 | Status: Geschlossen |
QUERY MIGHT FAIL WITH SQL0901N - BAD PLAN, UNRESOLVED QNC FOUND | |
| Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - 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 101 fix pack 3 * **************************************************************** | |
| Local-Fix: | |
Manually rewrite the query to perform De Morgan's Law | |
| verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
| Lösung | |
Fix was included in DB2 version 101 fix pack 3 | |
| Workaround | |
keiner bekannt / siehe Local-Fix | |
| Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 09.01.2013 07.10.2013 07.10.2013 |
| Problem behoben ab folgender Versionen (IBM BugInfos) | |
| Problem behoben lt. FixList in der Version | |
| 10.1.0.3 |
|
| 10.1.0.3 |
|