Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
171 views

SQL Code

This document provides descriptions for various SQLCODE error codes encountered when working with SQL in DB2. It includes error codes for issues like row not found, string too long, number of values in insert not matching columns, invalid date/time values, object not defined, column not in table, duplicate keys, locks, deadlocks and more. The codes range from +100 to -927 and provide information on why transactions may have failed or been rolled back.
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)
171 views

SQL Code

This document provides descriptions for various SQLCODE error codes encountered when working with SQL in DB2. It includes error codes for issues like row not found, string too long, number of values in insert not matching columns, invalid date/time values, object not defined, column not in table, duplicate keys, locks, deadlocks and more. The codes range from +100 to -927 and provide information on why transactions may have failed or been rolled back.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQLCODE +100 SQLSTATE 02000 Row not found or end of cursor SQLCODE -102 String constant is too long

SQLCODE -117 The number of values you are trying to INSERT does not match the number of columns SQLCODE -180 SQLSTATE 22007 Bad data in Date/Time/Timestamp String representation of DATE, TIME, TIMESTAMP is invalid SQLCODE -181 SQLSTATE 22007 Bad data in Date/Time/Timestamp Value for DATE, TIME, TIMESTAMP is invalid SQLCODE -199 Illegal use of the specified keyword. SQLCODE -204 Object not defined to DB2 SQLCODE -205 Column name not in specified table SQLCODE -206 Column does not exist in any table in the SELECT SQLCODE -216 You need to use the same number of expressions on both sides of the comparison. when using multiple operands in a comparison, Correct example: WHERE (E.SALARY, E.COMM) IN (SELECT S.PAY, S.COMMISSION Incorrect example: WHERE (E.SALARY, E.COMM, E.BONUS) IN (SELECT S.PAY, S.COMMISSION SQLCODE +222 Trying to fetch a row that fell through a DELETE hole SQLCODE +223 Trying to fetch a row that fell through an UPDATE hole SQLCODE -224 FETCH cannot make an INSENSITIVE cursor SENSITIVE SQLCODE -229 The locale specified in a SET LOCALE statement was not found. SQLCODE +231 FETCH but you did a BEFORE or AFTER and you are not on a valid row SQLCODE +304 Value cannot be assigned to this host variable because it is out of range SQLCODE -305 Null indicator needed SQLCODE -311 Varchar, insert or update. You didnt set the -LEN field with the right data length SQLCODE -482 he procedure returned no locators

SQLCODE -501 Cursor not open on FETCH SQLCODE -502 Opening cursor that is already open SQLCODE -503 Updating column which needs to be specified in FOR UPDATE OF SQLCODE -530 SQLSTATE 23503 Referential integrity prevents the INSERT/UPDATE SQLCODE -532 SQLSTATE 23504 Referential integrity (DELETE RESTRICT rule) DELETE SQLCODE -536 SQLSTATE 42914 Referential integrity (DELETE RESTRICT rule) DELETE SQLCODE -545 SQLSTATE 23513 Check constraint prevents the INSERT/UPDATE SQLCODE -747 The table specified is not available because tables and/or indexes need to be created. SQLCODE +802 The null indicator was set to -2 because an arithmetic statement didn't work. SQLCODE -803 SQLSTATE 23505 Duplicate key on insert or update. (Duplicate record in DB2) SQLCODE -805 DBRM or package not found in plan Is plan name correct? SQLCODE -811 More than one row retrieved in SELECT INTO SQLCODE -818 Plan and program: timestamp mismatch SQLCODE -904 SQLSTATE 57011 Unavailable resource. Someone is locking the data you need you may choose to terminate the program SQLCODE -911 SQLSTATE 40000 Deadlock or timeout. Rollback has been done. SQLCODE -913 SQLSTATE 40502 Your program was the victim of a deadlock or timeout. NO rollback has been done. You should do a ROLLBACK. SQLCODE -922 Authorization needed SQLCODE -927 The language interface was called but no connection had been made. prevents the

prevents the

You might also like