Db2 Sql Error 303
Tag: Error: DB2 SQL Error: SQLCODE=-303 SQLSTATE=42806 DB2 SQL Errors Codes and Error Messages and Warnings from Error -303 to -305 February 6, 2015 SQLServerF1 Leave a comment Error: DB2 SQL Error: SQLCODE=-303, SQLSTATE=42806, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER= A VALUE CANNOT BE ASSIGNED TO OUTPUT HOST VARIABLE NUMBER position-number BECAUSE THE DATA TYPES ARE NOT COMPARABLE Explanation: A CALL, FETCH, SELECT, VALUES INTO, or SET statement with an output host variable could not be performed because the data type of a variable was not compatible with the data type of the corresponding SELECT, VALUES INTO, or SET statement list http://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/codes/src/tpc/n303.html element. position-number Location of the host variable value in the output SQLDA. The values of the output host variable and the corresponding list element must be in one of the following categories: v Both must be numbers. v Both must be character strings, unless you are using Unicode. v Both must be graphic strings, unless you are using Unicode. v Both must be row IDs. v Both http://www.sqlserverf1.com/tag/error-db2-sql-error-sqlcode-303-sqlstate42806/ must be binary strings, or one can be BINARY or VARBINARY, and the other can be FOR BIT DATA. In addition, for datetime or timestamp values, the host variable must be a character string variable with a correct length. System action: The statement was not executed. No data is retrieved. Programmer response: Verify that table definitions are current and that the host variable has the correct data type. SQLSTATE: 42806 Error: DB2 SQL Error: SQLCODE=-304, SQLSTATE=22003, SQLERRMC=TBSPACEID=, TABLEID=, COLNO=, DRIVER= A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN POSITION position-number WITH DATA TYPE data-type2 Explanation: A CALL, FETCH, SELECT, VALUES INTO, or SET assignment statement with a host variable list or structure in position number position-number failed because the host variable with data type data-type2 was not large enough to hold the retrieved value with data type data-type1. System action: The statement cannot be executed. No data was retrieved. If the statement was a FETCH, the cursor remains open. Programmer response: Verify that table definitions are current, and that the host variable has the correct data type. See the
SET SQLDA T SELECT VALUES INTO SET T B B db2 sql error U B U B ID I S T CALL FETCH SELECT VALUES INTO SET N P V A CALL, FETCH, SELECT, VALUES <- BACK TO INDEX This is a free Service. I assume no warranty for misprints, and for the correctness and completeness of information and entries.