IBM Books

Messages Reference


SQL0600 - SQL0699

SQL0600N A function could not be generated because of a duplicate signature.

Cause: While attempting to create a distinct type, the generated cast function by the same name as the distinct type name could not be created because one with the same signature already exists in the schema.

The statement could not be processed.

Action: Choose another name for the distinct type or drop the function with the same name as the distinct type name.

sqlcode: -600

sqlstate: 42710

SQL0601N The name of the object to be created is identical to the existing name "<name>" of type "<type>".

Cause: The CREATE or ALTER statement tried to create or add an object "<name>" when an object of type "<type>" already exists with that name on the application server or in the same statement.

If "<type>" is FOREIGN KEY, PRIMARY KEY, UNIQUE, or CHECK CONSTRAINT, the "<name>" is the constraint name specified in the CREATE or ALTER TABLE statement or generated by the system.

DataJoiner users: some DataJoiner data sources do not provide the appropriate values for the "<name>" and "<type>" message tokens. In these cases, "<name>" and "<type>" will have the following format: "OBJECT:<data source> TABLE/VIEW", and "UNKNOWN" indicating that the actual values at the specified data source are not known.

The statement cannot be processed. No new object is created, and the existing object is not altered or modified.

Action: Either drop the existing object or choose another name for the new object.

DataJoiner users: if the statement is a CREATE FUNCTION MAPPING or a CREATE TYPE MAPPING statement, the user can also consider not supplying a type mapping name and the system will automatically generate a unique name for this mapping.

sqlcode: -601

sqlstate: 42710

SQL0602N The CREATE INDEX statement specifies too many columns (16 is the maximum).

Cause: The number of columns specified in the CREATE INDEX statement exceeds the maximum of 16. for the database manager.

DataJoiner users: the limit for other data sources is different. That limit has been exceeded. This problem may be detected on DataJoiner, or it may be detected on the data source.

The statement cannot be processed.

Action: Change the index definition to conform to the column limit of 16.

DataJoiner users: change the index definition to conform to the column limit for the data source.

sqlcode: -602

sqlstate: 54008

SQL0603N A unique index cannot be created because the table contains rows which are duplicates with respect to the values of the identified columns.

Cause: The index defined in the CREATE INDEX statement could not be created as unique, because the specified table already contains rows that duplicate the values of the identified columns.

DataJoiner users: this situation may be detected by DataJoiner or it may be detected by the data source.

The statement cannot be processed. The specified index is not created.

Action: Examine the data to determine if the duplicate data is permitted. Alternatively, consider creating a non-UNIQUE index.

sqlcode: -603

sqlstate: 23515

SQL0604N The length, precision, or scale attribute for column, distinct type, function, or type mapping "<data-item>" is not valid.

Cause: There is an error in the data type specification in a CREATE or ALTER statement, or a CAST specification. An invalid length, precision or scale attribute may have been specified, or it may be that the data type itself is incorrect or not permitted in this context. The location of the error is given by "<data-item>" as follows:

DataJoiner users: if the statement is a CREATE TYPE MAPPING statement, an attempt was made to create a type mapping where a type attribute for either the local data type or the remote data type is not valid. Possible reasons include:

The statement cannot be processed.

Action: Correct the syntax and try again.

sqlcode: -604

sqlstate: 42611

SQL0605W The index was not created because the index "<name>" already exists with the required description.

Cause: A CREATE INDEX operation attempted to create a new index and the indicated index matches the required index.

For CREATE INDEX, two index descriptions match if they identify the same columns in the same order with the same ascending or descending specifications, and are both specified as unique or the new index is specified as non-unique.

The new index was not created.

Action: No action is required unless the existing index "<name>" is not a suitable index.

sqlcode: +605

sqlstate: 01550

SQL0607N "<operation>" is not defined for system objects.

Cause: The "<operation>" specified in the SQL statement cannot be performed on system objects. One of the following was attempted:

The statement cannot be processed.

Action: Do not attempt to modify any system objects except for those columns of the system catalog tables which are updateable through updateable SYSSTAT views. See the SQL Reference for more information.

sqlcode: -607

sqlstate: 42832

SQL0612N "<name>" is a duplicate column name.

Cause: A statement was issued with the same column name appearing more than once where duplicates are not allowed. Where these column names appears varies depending on the type of statement.

The statement cannot be processed.

Action: Specify unique names for each column as appropriate for the type of statement.

sqlcode: -612

sqlstate: 42711

SQL0613N The primary key or a unique key identified by "<name>" is too long or has too many columns.

Cause: The sum of the internal lengths of columns in the PRIMARY KEY clause or a UNIQUE clause identified by "<name>" exceeds 255 or the number of columns exceeds the maximum of 16. Also, a primary key or a unique key cannot be defined using a LONG VARCHAR column.

"<name>" is the constraint name, if specified, of the primary key or unique constraint. If a constraint name was not specified, "<name>" is the first column name specified in the primary key or unique constraint clause followed by three periods.

The statement cannot be processed.

Action: Modify the primary key or a unique key definition by eliminating one or more key columns to conform to the column limit of 16 and the key length limit.

sqlcode: -613

sqlstate: 54008

SQL0614N The index cannot be created because the combined length of the specified columns is more than 255 bytes.

Cause: The index could not be created because the sum of the key column internal lengths would exceed 255. Also, an index cannot be created using a LONG VARCHAR, LONG VARGRAPHIC, or LOB column.

The statement cannot be processed. The specified index was not created.

Action: To modify the index definition, eliminate one or more key columns and reduce the key length to the permitted maximum.  

sqlcode: -614

sqlstate: 54008

SQL0624N Table "<name>" already has a "<key-type>" key.

Cause: A primary key or partitioning key cannot be defined in an ALTER TABLE statement because the indicated table already has a key of this type.

The statement cannot be executed.

Action: A table cannot have more than one primary key or partitioning key.

sqlcode: -624

sqlstate: 42889

SQL0628N Multiple or conflicting keywords involving the "<clause-type>" clause are present.

Cause: There are several possible reasons why this condition might have been diagnosed for the statement. Exactly which one happened is indicated by the value of "<clause-type>". The possibilities to consider are:

Action: Check that the statement conforms to the syntax and rules defined for the statement. Correct any invalid occurrences of duplicate or conflicting keywords.

sqlcode: -628

sqlstate: 42613

SQL0629N SET NULL cannot be specified because FOREIGN KEY "<name>" cannot contain null values.

Cause: The SET NULL option of the indicated FOREIGN KEY clause is not valid because no column of the key allows null values.

"<name>" is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.

The statement cannot be processed.

Action: Change either a column of the key to allow null values or change the delete rule.

sqlcode: -629

sqlstate: 42834

SQL0631N FOREIGN KEY "<name>" is too long or has too many columns.

Cause: The sum of the column internal lengths identified in the FOREIGN KEY clause in a CREATE TABLE statement exceeds 255, or the number of columns identified exceeds 16. Also, a foreign key cannot be defined using a LONG VARCHAR column.

"<name>" is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.

The statement cannot be processed.

Action: To modify the foreign key definition, eliminate one or more key columns and conform to the 16 column limit and the key length limit.

sqlcode: -631

sqlstate: 54008

SQL0632N FOREIGN KEY "<name>" is not valid because the table cannot be defined as a dependent of table "<table-name>" because of delete rule restrictions (reason code = "<reason-code>").

Cause: A referential constraint cannot be defined because the object table of the CREATE TABLE or ALTER TABLE statement cannot be defined as a dependent of table "<table-name>" for one of the following reason codes:

The delete rules of the existing relationships cause an error, not the delete rule specified in the FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement.

"<name>" is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.

The statement cannot be processed.

Action: If possible, eliminate the particular FOREIGN KEY clause from the CREATE TABLE or ALTER TABLE statement.

sqlcode: -632

sqlstate: 42915

SQL0633N The delete rule of FOREIGN KEY "<name>" must be "<delete-rule>" (reason code = "<reason-code>").

Cause: The delete rule specified in a FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement is not valid. The indicated delete rule is required for one of the following reason codes:

"<name>" is the constraint name, if specified, in the FOREIGN KEY clause. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.

The statement cannot be processed.

Action: If possible, change the delete rule.

sqlcode: -633

sqlstate: 42915

SQL0634N The delete rule of FOREIGN KEY "<name>" must not be CASCADE (reason-code = "<reason-code>").

Cause: The CASCADE delete rule specified in the FOREIGN KEY clause of the CREATE TABLE or ALTER TABLE statement is not valid for one of the following reason codes:

The statement cannot be processed.

Action: If possible, change the delete rule.

sqlcode: -634

sqlstate: 42915

SQL0637N More than one PRIMARY KEY clause or more than one DROP PRIMARY KEY clause was specified.

Cause: The CREATE TABLE statement contains two or more PRIMARY KEY clauses, or the ALTER TABLE statement contains two or more PRIMARY KEY or DROP PRIMARY KEY clauses.

The statement cannot be processed.

Action: Correct the statement.

sqlcode: -637

sqlstate: 42614

SQL0638N Table "<name>" cannot be created because no column definitions were specified.

Cause: The CREATE TABLE statement does not contain any column definitions.

The statement cannot be processed.

Action: Add one or more column definitions to the statement.

sqlcode: -638

sqlstate: 42601

SQL0644N Invalid value specified for keyword "<keyword>" in statement "<statement-type>".

Cause: The keyword "<keyword>" is followed by an invalid value as allowed by the description of "<statement-type>". For numeric values, the value may be outside a defined range. For other types, the value is not in the defined set of valid values.

Action: Determine from reference documentation for the "<statement-type>" what are valid values and make the appropriate change.

sqlcode: -644

sqlstate: 42615

SQL0658N The object "<name>" cannot be explicitly dropped.

Cause: The identifier "<name>" identifies a cast function or comparison function that cannot be dropped using the DROP statement because it was created by the system for use with a distinct type.

The statement cannot be processed.

Action: The function "<name>" can only be dropped by dropping the distinct type that caused the function to be defined. The distinct type name corresponds to either the name of the function or the type of the parameters to the function.

sqlcode: -658

sqlstate: 42917

SQL0659N Maximum size of a table object has been exceeded.

Cause: One or more of the objects which make up a table has reached its maximum size. The storage objects that make up a table are:

Once a storage object has grown to its maximum size, it cannot be extended further.

Action: To make existing space within the object available to store new data, the following actions may be taken:

sqlcode: -659

sqlstate: 54032

SQL0667N The FOREIGN KEY "<name>" cannot be created because the table contains rows with foreign key values that cannot be found in the parent key of the parent table.

Cause: The definition of the indicated foreign key failed because the table being altered contains at least one row where the foreign key does not match the parent key value in the parent table.

"<name>" is the constraint name, if specified. If a constraint name was not specified, "<name>" is the first column name specified in the column list of the FOREIGN KEY clause followed by three periods.

The statement cannot be processed. The specified table is not altered.

Action: Remove the erroneous table rows and define the foreign key.

sqlcode: -667

sqlstate: 23520

SQL0668N Operation not allowed when the underlying table (or a dependent table) is in the Check Pending state.

Cause: When a table is in a check pending state, there may be one or more rows that violate constraints defined on the data. This table cannot be used for the operation. An operation on a parent table that is not in a check pending state may also receive this error if a dependent table is in a check pending state.

Action: Execute the SET CONSTRAINTS statement with the IMMEDIATE CHECKED option and ensure that the data satisfies all the constraints defined on the table or the table depending on it.

sqlcode: -668

sqlstate: 57016

SQL0669N A primary key or unique constraint index cannot be dropped explicitly.

Cause: The DROP INDEX statement attempted to drop an index required to enforce the primary key or unique constraint of the table. A system required index cannot be dropped using the DROP INDEX statement.

The statement cannot be processed. The specified index is not dropped.

Action: If you do not want to keep the primary or unique constraint, use the DROP PRIMARY KEY clause or the DROP CONSTRAINT clause of the ALTER TABLE statement to remove the primary key or unique constraint. If the index was created only for enforcing the primary or unique key, then the index will be dropped. If not, the DROP INDEX statement could then be processed.

sqlcode: -669

sqlstate: 42917

SQL0670N The row length of the table is too long (the database manager maximum row length is 4005 bytes).

Cause: The row length of a table in the database manager cannot exceed 4005 bytes. The length is calculated by adding the internal lengths of the columns. Details of internal column lengths can be found under CREATE TABLE in the SQL Reference.

One of two conditions can occur:

The statement cannot be processed.

Action: In the case of CREATE TABLE or CREATE VIEW, to reduce the row length, eliminate one or more columns or reduce the lengths of one or more columns.

In the other case, eliminate one or more columns from the temporary table.

sqlcode: -670

sqlstate: 54010

SQL0673N A primary or unique key index cannot be created because the table contains rows which are duplicates with respect to the values of the identified primary or unique key columns of constraint "<name>".

Cause: The primary or unique key definition of the constraint identified by "<name>" failed because the table being altered already contains rows with duplicate values for the PRIMARY KEY or UNIQUE clause columns.

"<name>" is the constraint name, if specified. If a constraint name was not specified, "<name>" is the first column name specified in the primary key or unique constraint clause followed by three periods.

The statement cannot be processed. The specified table is not altered.

Action: Remove the erroneous rows from the table before attempting to define the primary or unique key.

sqlcode: -673

sqlstate: 23515

SQL0680N Too many columns are specified for a table or view.

Cause: The maximum number of columns permitted for each table is 500.

The maximum number of columns permitted for each view is 5000.

DataJoiner users: other data sources may have a different maximum column limit. This limit has been exceeded.

The statement cannot be processed.

Action: Ensure that the number of table or view columns does not exceed the limit. Create separate tables or views, as required, to hold additional information beyond the limit.

DataJoiner users: limit the number of table columns to the maximum supported by the data source. Create separate tables or views, as required, to hold additional information beyond the maximum number of columns supported by the data source.

sqlcode: -680

sqlstate: 54011

SQL0683N The specification for column, distinct type or function "<data-item>" contains incompatible clauses.

Cause: There is an error in a data item specification in a CREATE or ALTER. Incompatible specifications are present, such as: "INTEGER and FOR BIT DATA". The location of the error is given by "<data-item>" as follows:

The statement cannot be processed.

Action: Remove the incompatibility and try the statement again.

sqlcode: -683

sqlstate: 42842

SQL0696N The definition of trigger "<trigger-name>" includes an invalid use of correlation name or transition table name "<name>". Reason code="<reason-code>".

Cause: The trigger definition included an invalid use of "<name>". The value of "<reason-code>" indicates the specific problem as follows.

1
NEW correlation name and NEW_TABLE name are not allowed in a DELETE trigger.
2
OLD correlation name and OLD_TABLE name are not allowed in an INSERT trigger.
3
OLD_TABLE name and NEW_TABLE name are not allowed in a BEFORE trigger.

The statement cannot be processed.

Action: Remove the invalid correlation name or transition table name along with the preceding keyword.

sqlcode: -696

sqlstate: 42898

SQL0697N OLD or NEW correlation names are not allowed in a trigger defined with the FOR EACH STATEMENT clause.

Cause: The trigger, as defined, includes a REFERENCING clause with OLD or NEW correlation names specified (or both) and the FOR EACH STATEMENT clause. These cannot be specified together.

The statement cannot be processed.

Action: Remove any OLD or NEW correlation names from the REFERENCING clause or replace FOR EACH STATEMENT with FOR EACH ROW.

sqlcode: -697

sqlstate: 42899


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]