ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Quick Explain discards errant SQL rather than Putting an Error

book

Article ID: 240879

calendar_today

Updated On:

Products

Database Analyzer for DB2 for z/OS Database Management for DB2 for z/OS - Administration Suite Database Management for DB2 for z/OS - Performance Suite Database Management for DB2 for z/OS - Recovery Suite Database Management for DB2 for z/OS - SQL Performance Suite Database Management for DB2 for z/OS - Utilities Suite

Issue/Introduction

The following statement was executed with SQL CODE=0 without any error.

SELECT COUNT(*)

FROM PROD.STMT_HSEHOLD_11594;

WHERE STMT_PERIOD_NO='04';

Why no error for the second statement(WHERE CLAUSE) which was a typo.

 

 

Environment

Release : 20.0

Component : Plan Analyzer for DB2 for z/OS

Resolution

Product works as designed. The WHERE clause was ignored because it's not an explainable statement. A statement is an explainable if it is a SELECT, MERGE, TRANCATE or INSERT statement, or the searched form of an UPDATE or DELETE statement.