CVTDBF* using QMQRY failing with SQL0012

On IBM i V7R1M0 CVTDBF* fails with the warning message SQL0012 but completes succssfully on IBM i V6R1M0.

This is due to a change in the way warning messages are returned.

From the 'Memo to users V7R1'
Page 23

SQL warnings now reported to applications
In earlier releases of IBM i, warning conditions which were encountered during the processing of query
result sets were not always reported back to the application as they should have been. These warnings,
which include but are not limited to, SQLSTATE 01003 - ’Null values were eliminated from an
argument of an aggregate function’, and SQLSTATE 01506 -’An adjustment was made to a DATE or
TIMESTAMP value to correct an invalid date resulting from an arithmetic operation’, are now
returned to the application. As a result of this change, ODBC and CLI applications encountering these
warnings receive a SQL_SUCCESS_WITH_INFO return code on the fetch API request rather than a
SQL_SUCCESS return code.
www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzaq9/rzaq9.pdf

 

The message occurs when a column is referenced that does not exist in any of the tables or views identified in the FROM clause of the same level of the subselect.

 

Article Details

Article ID:
55
Date added:
20/02/2015 16:00:09
Views:
645
Rating (Votes):
(7,340)

Related articles