• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
SQLCODES for DB2 Version 7
Scroll down to see ALL the SQLCODES there are in Version 7.The most common ones are at thetop.SQLCODE +100SQLSTATE 02000Row not found or end of cursor SQLCODE -102String constant is too longSQLCODE -117The number of values you are trying to INSERT does not match thenumber of columnsSQLCODE -180SQLSTATE 22007Bad data in Date/Time/TimestampString representation of DATE, TIME, TIMESTAMP is invalidSQLCODE -181SQLSTATE 22007Bad data in Date/Time/TimestampValue for DATE, TIME, TIMESTAMP is invalidSQLCODE -199Illegal use of the specified keyword.SQLCODE -204Object not defined to DB2SQLCODE -205Column name not in specified tableSQLCODE-206Column does not exist in any table in the SELECTSQLCODE -216You 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.COMMISSIONIncorrect example:WHERE (E.SALARY, E.COMM,
E.BONUS
)IN(SELECT S.PAY, S.COMMISSION
 
SQLCODE +222Trying to fetch a row that fell through a DELETE holeSQLCODE +223Trying to fetch a row that fell through an UPDATE holeSQLCODE -224FETCH cannot make an INSENSITIVE cursor SENSITIVESQLCODE -229The locale specified in a SET LOCALE statement was not found.SQLCODE +231FETCHbut you did a BEFORE or AFTER and you are not on a valid rowSQLCODE +304Value cannot be assigned to this host variable because it is out of rangeSQLCODE -305Null indicator neededSQLCODE -311Varchar, insert or update. You didn’t set the -LEN field with the right data lengthSQLCODE -482The procedure returned no locatorsSQLCODE -501Cursor not open on FETCHSQLCODE -502Opening cursor that is already openSQLCODE -503Updating column which needs to be specified in FOR UPDATE OFSQLCODE -530SQLSTATE 23503Referential integrity prevents the INSERT/UPDATESQLCODE -532SQLSTATE 23504Referential integrity (DELETE RESTRICT rule) prevents the DELETE
 
SQLCODE -536SQLSTATE 42914Referential integrity (DELETE RESTRICT rule) prevents the DELETESQLCODE -545SQLSTATE 23513Check constraint prevents the INSERT/UPDATESQLCODE -747The table specified is not available because tables and/or indexes need to be created.SQLCODE +802The null indicator was set to -2 because an arithmetic statement didn't work.SQLCODE -803SQLSTATE 23505Duplicate key on insert or updateSQLCODE -805DBRM or package not found in planIs plan name correct?SQLCODE -811More than one row retrieved in SELECT INTOSQLCODE -818Plan and program: timestamp mismatchSQLCODE -904SQLSTATE 57011Unavailable resource. Someone is locking the data you needyou may choose to terminate the programSQLCODE -911SQLSTATE 40000Deadlock or timeout. Rollback has been done.SQLCODE -913SQLSTATE 40502Your program was the victim of a deadlock or timeout.NO rollback has been done.You should do a ROLLBACK.SQLCODE -922Authorization needed
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...