0% found this document useful (0 votes)
36 views

SQL Important Return Codes

This document lists important SQL return codes, separating them into negative values for errors and positive values for warnings. Some example error codes listed include -102 for a string constant being too long, -205 for a column not existing in the selected table, and -224 for a fetch not being able to make a cursor sensitive. Example warning codes listed are +100 for a row not being found, +222 for trying to fetch a row within a delete statement, and +802 for a null indicator being set to -2 due to an arithmetic statement not working.

Uploaded by

prashanth_cbsm
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

SQL Important Return Codes

This document lists important SQL return codes, separating them into negative values for errors and positive values for warnings. Some example error codes listed include -102 for a string constant being too long, -205 for a column not existing in the selected table, and -224 for a fetch not being able to make a cursor sensitive. Example warning codes listed are +100 for a row not being found, +222 for trying to fetch a row within a delete statement, and +802 for a null indicator being set to -2 due to an arithmetic statement not working.

Uploaded by

prashanth_cbsm
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Important Return Codes

Negative values (Errors)


-102 -117 -180 -181 -199 -204 -205 -206 -216 -224 -229 -305 -311 -482 -501 -502 -503 -530 -532 -536 -545 -551 -747 -803 -805 -811 -818 String constant is too long. The number of values in the INSERT does not match the number of columns. Bad data in Date/Time/Timestamp. Bad data in Date/Time/Timestamp. Illegal use of the specified keyword. Object not defined to DB2. Column name not in table. Column does not exist in any table of the SELECT. Not the same number of expressions on both sides of the comparison in a SELECT . FETCH cannot make an INSENSITIVE cursor SENSITIVE. The locale specified in a SET LOCALE statement was not found. Null indicator needed. Varchar, insert or update. -LEN field with the right data length not set. The procedure returned no locators. Cursor not open on FETCH. Opening cursor that is already open. Updating column needs to be specified. Referential integrity preventing the INSERT/UPDATE Referential integrity (DELETE RESTRICT rule) preventing the DELETE. Referential integrity (DELETE RESTRICT rule) preventing the DELETE. Check constraint preventing the INSERT/UPDATE. Authorization failure The table is not available. Duplicate key on insert or update. DBRM or package not found in plan. More than one row retrieved in SELECT INTO. Plan and program: timestamp mismatch.

-904 Unavailable resource. Someone else is locking your data. -911 Deadlock or timeout. Rollback has been done. -913 Deadlock or timeout. No rollback. -922 Authorization needed. -927 The language interface was called but no connection had been made. -936 -1741 -20000

Positive Values (Warnings)


+100 +222 +223 +231 +304 +802 Row not found or end of cursor. Trying to fetch a row within a DELETE statement. Trying to fetch a row within an UPDATE statement. FETCH after a BEFORE or AFTER but not on a valid row. Value cannot be assigned to this host variable because it is out of range. The null indicator was set to -2 as an arithmetic statement didn't work.

You might also like