| Next Tip?
Home » Database Questions, DB2, Mainframe

DB2 : SQL Codes and Description

9 August 2009 381 views No Comment
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 2.00 out of 5)
Loading ... Loading ...

SQL CODES                       DESCRIPTION

000                                         Sql Statement finished succesfully
+100                                       No rows satisfied the sql statement
+117                                       No of values being inserted is not equal to no. of  columns in the table being inserted to
+162                                       Named table space is placed in check pending                                  status
+204                                       Named Object is not defined to Db2
+205                                       Named column does not exist in the named table
+206                                      Named column does not exist in any table which is  named in the sql statement
+625                                      Table defination marked incomplete because     primary Key index was dropped
+802                                      Data Exception error caused by data    overflow/divide Exception
-007                                       Sql Statement contains illegal character
-029                                       INTO clause is required
-060                                       Specified Data type has an invalid length/scale  specification
-084                                       Sql statement can’t be excuted because it is invalid for Dynamic sql/is an sql /ds statement
-101                                       Sql statement exceeds an established DB2 limit  (Too many tables / Too many bytes in                                                        the statement)

Date/Time

-180                                     Syntax for string representation of  Date/Time  value is invalid
-181                                     String representation of Date/Time value is invalid
-182                                     Date/Time value in an arithmetic expression is       invalid
-183                                    Result of arithmetic expression Returns a   Date/Time value that is not in the range of valid                                              values

Cursors

-501                   Cursor must be opened before attempting to fetch   from it  or close it
-502                   Cursor can’t opened twise without first closing it
-503                   Column can’t be updated because it was not specified in  the FOR UPDATE OFF clause of the cursor                                from it was fetched
-504                   Cursor can’t be referenced because it defined to   the program
-507                   Cursor must be opened before attempting to    update/delete  WHERE CURRENT OF
-508                   You can’t update or delete because referenced cursor is not positioned in a data row
-509                   You can’t upate from a different table than the one specified on the cursor referenced by                                                      WHERE CURRENT OF clause

Referential Integrity

-530                   Invalid foreign key was specified for specified   constraint name
-531                   Primary key value can’t be updated if foreign keys  currently exist that reference that value
-532                   Deletion violates the named referential constraint
-533                   Multiple row insert is invalid; Attempting to insert    multiple rows into a self referencing table
-534                   Update statement changing primary key column can’t be used to update more than one row at a time
-535                   WHERE CURRENT OF can’t be specified when deleting from a self referencing table or updating                                        primary key column
-536                   Delete statement is invalid due to referential  constraints existing for the specified table
-537                   Single column can’t  appear more than once in foreign/primary key clause specification
-538                   Foreign key is invalid. Because it does not conform  to the definition of referenced table primary key
-539                   Foreign key can’t be defined because the referenced table does not have primary key
-540                   Table definition is incomplete until unique index is created for the primary key
-551                   User is attempting to perform an operation on the  specified object for which user is not authorised or                             Table does not exist
-601                   An attempt was made to create an object that already exists
-602                   Too many columns were specified in CREATE INDEX statement
-603                   Unique index cannot be created because duplicates were found
-607                   INSERT,UPDATE,DELETE can’t be issued as written against the DB2 catalogue tables
-612                   Duplicate column names are permitted in single table
-803                   Row can’t be inserted because it would violate the constraints of the unique index
-818                   Time Stamp Mismatch
-904                   Specified resource is unavailable
-911                   Current unit of work has  been Rolled back
-913                   Execution is unsuccessful due to DEADLOCK/TIME OUT
-922                   Connection authorisation failure. Attempt made to access DB2 from TSO, CICS,IMS and appropriate                               attachment facility is inactive

Popularity: unranked [?]

Related interview questions

Leave your response!

You must be logged in to post a comment.