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

A work around is to qualify fields with the tables inside any subselects.

Article Details

Article ID:
54
Date added:
20/02/2015 15:58:43
Views:
847
Rating (Votes):
(7,374)

Related articles