IBM Books

Messages Reference


SQL20000 - SQL20099



SQL20005N The internal identifier limit for object type "<type>" has been exceeded.

Cause: The create of an object of type "<type>" cannot be processed because the next internal identifier for the object would exceed the maximum value.

The statement cannot be processed.

Action: Drop objects of type "<type>" that are not being used any more.

sqlcode: -20005

sqlstate: 54035



SQL20010N Mutation method "<method-name>" is not allowed when the instance of the structured type is NULL.

Cause: The method "<method-name>" is a mutator method that is specified with an instance of a structured type that is null. Mutator methods cannot be processed on a null instance. In some cases, the method name is not available.

The statement cannot be processed.

Action: Determine the null instance that is used with a mutator method. Use a constructor function to create a non-null instance of the structured type before using any mutator methods on the instance.

sqlcode: -20010

sqlstate: 2202D



SQL20011N A "<transform-type>" transform for data type "<type-name>" already exists.

Cause: A transform for type "<type-name>" is already defined to perform "<transform-type>" transforms.

The statement cannot be processed.

Action: Either correct the "<transform-type>" to one that is not yet defined for "<type-name>" or drop the existing transform and re-issue the statement.

sqlcode: -20011

sqlstate: 42739



SQL20012N No transforms for type "<type-name>" were dropped.

Cause: There are no transforms defined for "<type-name>" that meet the criteria of the DROP TRANSFORM request.

The statement cannot be processed.

Action: Ensure the name of the type (including any required qualifiers) is correctly specified in the SQL statement and it exists.

sqlcode: -20012

sqlstate: 42740



SQL20013N The object "<super-object-name>" is not valid as a supertype, supertable, or superview of object "<sub-object-name>".

Cause: If the statement resulting in the error is creating a type, then "<super-object-name>" is a type that cannot be be a supertype of "<sub-object-name>" because it is not a user-defined structured type.

If the statement resulting in the error is creating a table, then "<super-object-name>" is a table that cannot be be a supertable of table "<sub-object-name>" because it is not defined as a typed table or the type of table "<super-object-name>" is not the direct supertype of the type used in defining table "<sub-object-name>".

If the statement resulting in the error is creating a view, then "<super-object-name>" is a viewe that cannot be be a superview of view "<sub-object-name>" because it is not defined as a typed view or the type of view "<super-object-name>" is not the direct supertype of the type used in defining view "<sub-object-name>".

The statement cannot be processed.

Action: Specify a valid type, table, or view in the UNDER clause of the CREATE statement.

sqlcode: -20013

sqlstate: 428DB



SQL20014N Function "<function-name>" cannot be used as a "<transform-type>" transform function for type "<type-name>".

Cause: The function "<function-name>" cannot be used as a transform for data type "<type-name>". The reason is based on the "<transform-type>" as follows.

TO PROGRAM
The function must be a scalar function with a single parameter of the given type and a result os a built-in type.

FROM PROGRAM
The function must be a scalar function with a single parameter of a built-in type and a result of the given type.

TO FUNCTION
The function must be a scalar function with a single parameter of the given type. It may be an SQL scalar function that returns a built-in type other than DECIMAL, or an SQL row function that returns a row whose columns all have built-in types other than DECIMAL.

FROM FUNCTION
The function must be a scalar function, all of it parameters have built-in types other than DECIMAL, and whose return type is the given type.

The statement cannot be processed.

Action: Specify a valid function for the type of transform.

sqlcode: -20014

sqlstate: 428DC



SQL20015N "<transform-type>" transform for type "<type-name>" is not defined.

Cause: An operation involving a user-defined type required a transform function of the type "<transform-type>". This transform type has not been defined for the user-defined type "<type-name>".

The statement cannot be processed.

Action: Define a transform of "<transform-type>" for user-defined type "<type-name>" using the CREATE TRANSFORM statement.

sqlcode: -20015

sqlstate: 42741



SQL20016N The value of the length associated with column "<column-name>" of type "<type-name>" is too small.

Cause: The column "<column-name>" is defined with a structured type "<type-name>" for which the minimum length requirement is greater than the length specified using the LENGTH option.

The statement cannot be processed.

Action: Specify a length value that is at least the minimum length of the structured type.

sqlcode: -20016

sqlstate: 429B2



SQL20017N Addition of this subtype exceeds the maximum number of levels of a type hierarchy.

Cause: The maximum number of levels in a type hierarchy is 99. Adding this type would exceed the maximum.

The statement cannot be processed.

Action: Do not add any more subtypes to this type hierarchy.

sqlcode: -20017

sqlstate: 54045



SQL20018N Row function "<function-name>" must return at most one row.

Cause: The function is a defined to return a single row. The result of the processing the function is more than one row.

Action: Ensure that the function is defined in such a way that at most one row is returned.

sqlcode: -20018

sqlstate: 21505



SQL20019N The result type returned from the function body cannot be assigned to the data type defined in the RETURNS clause.

Cause: The data type of each column returned by the function body must be assignable to the corresponding column specified in the RETURNS clause. If the function is a scalar function, there is only one column.

Action: Change the RETURNS type or the type returned from the function body so that the data types of corresponding columns are assignable.

sqlcode: -20019

sqlstate: 42866



SQL20020N Operation "<operation-type>" is not valid for typed tables.

Cause: The operation identified by "<operation-type>" cannot be performed on a typed tables.

The statement cannot be processed.

Action: Remove the ADD COLUMN clause or SET DATATYPE clause from the ALTER statement. Columns can only be added by re-defining the table with a structured type that includes the new column as an attribute. Similarly, the data type of a column can only be changed by re-defining the table with a type that includes the column with a different data type.

sqlcode: -20020

sqlstate: 428DH



SQL20021N Inherited column or attribute "<name>" cannot be changed or dropped.

Cause: The value of "<name>" identifies either a column name or an attribute name (depending on the statement context) that is inherited from a typed table, typed view, or structured type above it in the table, view, or type hierarchy.

The statement cannot be processed.

Action: The options for a column may only be set or altered for the table or view in the typed table hierarchy or typed view hierarchy where the column is introduced. An attribute can only be dropped from the data type in the type hierarchy where the attribute was introduced.

sqlcode: -20021

sqlstate: 428DJ



SQL20022N The scope for the reference column "<column-name>" is already defined.

Cause: The scope for the reference column "<column-name>" cannot be added because it is already defined.

The statement cannot be processed.

Action: Remove the ADD SCOPE clause from the ALTER TABLE statement.

sqlcode: -20022

sqlstate: 428DK



SQL20023N Parameter "<parm-number>" of the external or sourced function has a scope defined.

Cause: A reference type parameter should not have a scope defined when used with external or sourced user defined functions.

The statement cannot be processed.

Action: Remove the SCOPE specification from the definition of the parameter.

sqlcode: -20023

sqlstate: 428DL



SQL20024N The scope table or view "<target-name>" is not defined with structured type "<type-name>".

Cause: The scope table or view "<target-name>" is not valid for use as the scope of this reference because it is:

The statement cannot be processed.

Action: Specify the scope of the reference using a typed table or typed view with the same type as the target type of the REF type.

sqlcode: -20024

sqlstate: 428DM



SQL20025N SCOPE is not specified in the RETURNS clause of an external function or is specified in the RETURNS clause of a sourced function.

Cause: There are two possible causes:

The statement cannot be processed.

Action: When defining an external function with a reference type as a returns type, ensure that the SCOPE clause is specified. When defining SOURCED function with a reference type as a returns type, ensure that the SCOPE clause is not specified.

sqlcode: -20025

sqlstate: 428DN



SQL20026N The type "<type-name>" is not a structured type.

Cause: The statement requires a structured type, but the non-structured type "<type-name>" was used.

The statement cannot be processed.

Action: Verify that the correct type name is used in the statement.

sqlcode: -20026

sqlstate: 428DP



SQL20027N The subtable or subview "<sub-object-name>" was not created because subtable or subview "<object-name>" with type "<type-name>" already exists.

Cause: Within a typed table or view hierarchy, only one subtable or subview may exist of a particular subtype. The table or view "<sub-object-name>" cannot be created since there is already a table or view of type "<type-name>" defined. The table or view that already exists is "<object-name>".

The statement cannot be processed.

Action: Verify that the subtable or subview is being created with the correct type and that the subtable is being created under the correct supertable or the subview is being created under the correct superview.

sqlcode: -20027

sqlstate: 42742



SQL20028N A subtable or subview cannot have a different schema name than its supertable or superview.

Cause: All tables in a typed table hierarchy must have the same schema name and all views in a typed view hierarchy must have the same schema name.

The statement cannot be processed.

Action: Verify that the schema name of the table or view is correct and that the table is being created under the correct supertable or the subview is being created under the correct superview.

sqlcode: -20028

sqlstate: 428DQ



SQL20029N "<operation>" cannot be applied to a subtable.

Cause: The operation "<operation>" was applied to a table that is not the root of a table hierarchy.

The statement cannot be processed.

Action: Specify the root table of the table hierarchy in the operation.

sqlcode: -20029

sqlstate: 428DR



SQL20030N Attributes of a structured type "<type-name>" cannot be altered when a typed table or typed view "<object-name>" based on the type or any of its subtypes exists.

Cause: The attributes of a structured type cannot be changed if a table or view of the structured type or any of its subtypes currently exists. The table or view "<object-name>" is one table or view that is dependent on the structured type "<type-name>" or a proper subtype of this type. There may be other tables or views that are dependent on the type or one of its proper subtypes.

The statement cannot be processed.

Action: Verify that the right type is being altered or drop any tables and views of the type (or its subtypes) that currently exist.

sqlcode: -20030

sqlstate: 55043



SQL20031N "<Object>" may not be defined on a subtable.

Cause: Primary key and unique constraints can only be defined on the root table of a typed table hierarchy. Similarly, unique indexes can only be defined on the root table of a typed table hierarchy.

The statement cannot be processed.

Action: Unique indexes, Primary key or unique constraints can only be defined on the root table of a table hierarchy.

sqlcode: -20031

sqlstate: 429B3



SQL20032N Index on the specified columns cannot be defined on subtable "<table-name>".

Cause: The columns specified for the index were all introduced at a higher level in the typed table hierarchy than subtable "<table-name>". Therefore, the index cannot be created on this subtable.

The statement cannot be processed.

Action: Determine the table in the table hierarchy where all of the columns are included for the first time. Use this as the table name when creating the index.

sqlcode: -20032

sqlstate: 428DS



SQL20033N An expression including "<partial-expression>" does not include a valid scoped reference.

Cause: The expression that includes "<partial-expression>" requires an operand that is reference type with a scope defined. If the expression includes the DEREF function, the argument of the function must be a reference type with a scope defined.

For the dereference operator (->), the left operand needs to be a reference type with a scope defined.

The statement cannot be processed.

Action: Correct the SQL statement syntax so the operand or argument is a reference type with a scope defined.

sqlcode: -20033

sqlstate: 428DT



SQL20034N The data type "<list-type-name>" is not included in a stuctured data type hierarchy that includes the data type "<left-type-name>" of the left operand of the TYPE predicate.

Cause: All the data types listed in the TYPE predicate must be included in a data type hierarchy that includes the data type of the left operand of the TYPE predicate. The data type "<left-type-name>" is not a structured data type (not part of any type hierarchy) or the data type "<list-type-name>" is not included in the data type hierarchy that includes "<left-type-name>".

The statement cannot be processed.

Action: Ensure that the data type of the expression and all listed data types in the TYPE predicate are structured data types within the same data type hierarchy. If "<left-type-name>" is SYSIBM.REFERENCE, use DEREF to make the result data type of the expression a structured data type.

sqlcode: -20034

sqlstate: 428DU



SQL20035 Invalid left operand of a dereference operator. Path expression starts with "<expression-string>".

Cause: The left operand of the dereference operator in a path expression is not valid. Possible causes are:

Action: Correct the left operand of the dereference operator for the path expression that starts with "<expression-string>".

sqlcode: -20035

sqlstate: 428DV



SQL20036N The object identifier column "<column-name>" cannot be referenced using the dereference operator.

Cause: The dereference operator is used with "<column-name>" as the right operand. This column is the object identifier column of the target table of the dereference and is not valid for this operator.

The statement cannot be processed.

Action: Correct the name of the column in the dereference operation.

sqlcode: -20036

sqlstate: 428DW



SQL20037N Object identifier column is required to create the root table or root view "<object-name>" of a typed table or view hierarchy.

Cause: When creating the root table of a typed table hierarchy, an object identifier (OID) column must be defined (using the REF IS clause) on the CREATE TABLE statement.

When creating the root view of a typed view hierarchy, an object identifier (OID) column must be defined (using the REF IS clause) on the CREATE VIEW statement.

The statement cannot be processed.

Action: Add the required OID column (REF IS clause) to the CREATE TABLE or CREATE VIEW statement.

sqlcode: -20037

sqlstate: 428DX



SQL20038N ASC or DESC cannot be specified with the "<keywords>" clause.

Cause: The use of ASC or DESC is not relevant for all types of indexes. An index created using the "<keywords>" clause cannot order by ASC or DESC for specific columns.

The statement cannot be processed.

Action: Remove the ASC or DESC specification from the index columns.

sqlcode: -20038

sqlstate: 42601



SQL20039N The definition of index "<index-name>" does not match the definition of index extension "<index-ext-name>".

Cause: The index definition and the index extension definition do not match. The following lists the possibilities for where the definitions do not match.

The statement cannot be processed.

Action: Change the index definition so that the index extension matches.

sqlcode: -20039

sqlstate: 428E0



SQL20040N Number or type of the result of the range-producing table function "<range-function-name>", is inconsistent with that of key transformation table function "<transform-function-name>" for index extension "<index-ext-name>".

Cause: The range-producing function must:

More precisely, let a1:t1,... an:tn be the function result columns and data types of the key transformation function. The function result columns of the range-producing function must be b1:t1,...,bm:tm,c1:t1,...,cm:tm, where m <= n and the "b" columns are the start key columns and the "c" columns are the stop key columns.

The statement cannot be processed.

Action: Specify a range-producing table function that is consistent with the key transformation table function.

sqlcode: -20040

sqlstate: 428E1



SQL20041N Number or the type of target key parameters does not match with the number or type of key transform function "<function-name>" for index extension "<index-ext-name>".

Cause: The number of target key parameters has to match with the number of results returned by the key transform function. In addition, the type of the target key parameters must exactly match the corresponding function result types.

The statement cannot be processed.

Action: Specify the correct number and type of parameters as the target key parameters.

sqlcode: -20041

sqlstate: 428E2



SQL20042N The maximum allowable "<parm-type>" parameters is exceeded in index extension "<index-ext-name>". The maximum is "<max-value>".

Cause: Too many parameters were specified. If "<parm-type>"is INDEX EXTENSION, then up to "<max-value>" instance parameters may be specified. If "<parm-type>"is INDEX KEYS, then up to "<max-value>" key source parameters may be specified.

The statement cannot be processed.

Action: Specify no more than the maximum number of parameters.

sqlcode: -20042

sqlstate: 54046



SQL20043N Argument for function "<function-name>" is not valid. Reason code "<reason-code>".

Cause: The function "<function-name>" could be the transformation function, the range-producing function, or the index filter function. The reason code indicate why an argument is not valid:

  1. For a key transformation function, the argument is not an observer function or an index extension instance parameter

  2. The expression used as the argument uses a function that specifies LANGUAGE SQL.

  3. The expression used as the argument is a subquery.

The statement cannot be processed.

Action: Specify a valid argument for the function.

sqlcode: -20043

sqlstate: 428E3



SQL20044N Function "<function-name>" is not supported in CREATE INDEX EXTENSION statement. Reason Code "<reason-code>".

Cause: A function used in the CREATE INDEX EXTENSION statement is not valid where it is used. The reason code indicates the reason.

1
The key transformation function is not a table function.

2
The key transformation function is not an external function.

3
The key transformation function is a variant function.

4
The key transformation function is an external action function.

5
The range-producing function is not a table function.

6
The range-producing function is not an external function.

7
The range-producing function is a variant function.

8
The range-producing function is an external action function.

9
The index-filter function is not an external function.

10
The index-filter function is a variant function.

11
The index-filter function is an external action function.

The statement cannot be processed.

Action: Specify a function that conforms to the rules for a function specified in the specific clause of the CREATE INDEX EXTENSION statement.

sqlcode: -20044

sqlstate: 428E4



SQL20045N The data type of instance parameter "<parameter-name>" is invalid in index extension "<index-ext-name>".

Cause: An instance parameter must be one of the following data types: VARCHAR, VARGRAPHIC, INTEGER, DECIMAL, or DOUBLE.

The statement cannot be processed.

Action: Specify a valid data type for the instance parameter "<parameter-name>".

sqlcode: -20045

sqlstate: 429B5



SQL20047N The search method "<method-name>" is not found in the index extension "<index-ext-name>".

Cause: The method "<method-name>" referenced in an exploitation rule of the user-defined predicate has to match one of the search methods specified in the index extension "<index-ext-name>".

The statement cannot be processed.

Action: Specify a method defined in the index extension.

sqlcode: -20047

sqlstate: 42743



SQL20048N The search argument of method "<method-name>" does not match the one in the corresponding search method in the index extension "<index-ext-name>".

Cause: The search argument provided for method "<method-name>" does not match the argument of the corresponding search method in the index extension "<index-ext-name>". Either the number of arguments or the type of the arguments do not match the defined number or type of the parameters.

The statement cannot be processed.

Action: Specify a search argument that matches the paramters defined in the index extension.

sqlcode: -20048

sqlstate: 428E6



SQL20049N Type of an operand following the comparison operator in the AS PREDICATE WHEN clause does not exactly match the RETURNS type.

Cause: The definition of the user-defined predicate is not valid. In the AS PREDICATE WHEN clause, the type of the operand following the the comparison operator is not an exact match with the RETURNS type of the function.

The statement cannot be processed.

Action: Specify an the operand with the correct data type.

sqlcode: -20049

sqlstate: 428E7



SQL20050N The search target or search argument "<parameter-name>" does not match a parameter name of the function being created.

Cause: Each search target and each search argument in an index exploitation rule has to match some parameter name of the function that is being created. This implies that the parameter names must be specified.

The statement cannot be processed.

Action: Specify only parameter names of the function in the search target or search argument.

sqlcode: -20050N

sqlstate: 428E8



SQL20051N The argument "<parameter-name>" cannot appear as both a search target and a search argument in the same exploitation rule.

Cause: In the exploitation clause, a function parameter cannot be specified as an argument following KEY and as an argument of the method specified following the USE keyword.

The statement cannot be processed.

Action: Specify a parameter name of the function in no more than on of the search target or the search argument.

sqlcode: -20051

sqlstate: 428E9



SQL20052N Column "<column-name>" is an object identifier column which cannot be updated.

Cause: The UPDATE statement includes setting a column that is an object identifier (OID) column. An OID column cannot be updated.

The statement cannot be processed.

Action: Remove the SET of "<column-name>" from the UPDATE statement.

sqlcode: -20052

sqlstate: 428DZ



SQL20053N Fullselect in typed view "<view-name>" is not valid. Reason code = "<reason-code>".

Cause: The fullselect specified in the definition of typed view "<view-name>" does not conform to the rules for the fullselect of a typed view. Possible reason codes follow.

  1. There is more than one table specified in the FROM clause.
  2. The values of the rows of the object identifier column cannot be proven by the database manager to be distinct from the set of object identifier values in the rest of the typed view hierarchy.
  3. The first column of a root view is
  4. The table or view in the FROM clause of a subview is not a subtable or subview of the table or view referenced in the FROM clause of the superview.
  5. The fullselect includes references to the NODENUMBER or PARTITION functions, non-deterministic functions, or functions defined to have external action.

Action: Change the fullselect of the view definition based on the "<reason-code>".

  1. Use only one table or view in the FROM clause.
  2. Specify a different table or view in the FROM clause that is not the same as one already used in the view hierarchy or use a predicate that clearly defines the set of object identifier column values for this view as distinct compared to the object identifier column values for other views in the typed view hierarchy.
  3. Ensure that the first column of the root view conforms to the rules to be a valid object identifier column for the typed view.
  4. Specify a subtable or subview of the table or view specified in the FROM clause of the superview.
  5. Remove the reference to the function from the fullselect.

sqlcode: -20053

sqlstate: 428EA



SQL20054N The table "<table-name>" is in an invalid state for the operation. Reason code="<reason-code>".

Cause: The table is in a state that does not allow the operation. The reason code indicates the state of the table that prevents the operation.

21
The table is in Datalink Reconcile Pending (DRP) state or Datalink Reconcile Not Possible (DRNP) state. An update, insert, or delete is attempted that would cause a datalink value under FILE LINK CONTROL to be linked or unlinked.

The statement cannot be processed.

Action: The action depends on the reason code.

21
Refer to the Administration Guide for information on how to reconcile datalink values.

sqlcode: -20054

sqlstate: 55019



SQL20055N A result column data type in the select list is not compatible with the defined data type for column "<column-name>".

Cause: The data type of the select list expression corresponding to "<column-name>" is incompatible with the data type for the attribute of the structured type. Both must be:

The statement cannot be processed.

Action: Examine the current definition for the table and the associated structured type. Ensure the select list expession data type for the specified column is a compatible type.

sqlcode: -20055

sqlstate: 42854



SQL20056N Processing on file server "<server-name>" encountered an error. Reason code = "<reason-code>". Additional diagnostic information "<diag-token>". A DB2 File Manager is not in a correct state for a file.

Cause: The processing involving a Datalink value on the file server for the statement encountered an error for one of the following reasons.

01
An inconsistency was detected between the data on the file server and the datalink value in a table. The additional diagnostic information "<diag-token>" identifies the table that is inconsistent with the file server information.

02
The file server reached a resource limit during the processing. There is no additional diagnostic information.

99
The file server encountered an internal processing error. There is no additional diagnostic information.

The statement cannot be processed.

Action: The action is based on the "<reason-code>" as follows.

01
Run the reconcile utility for the table identified in the additional diagnostic information.

02
The file server administrator should identify the resource from the diagnostic logs on the file server and take corrective action.

99
Save the diagnostic logs from the file server and the database and contact IBM service.

sqlcode: -20056

sqlstate: 58004



SQL20057N Column "<column-name>" in subview "<view-name>" cannot be defined as read only when the corresponding column is updatable in the superview.

Cause: The column identified by "<column-name>" in the subview "<view-name>" is defined (implicitly) as read only. The superview of "<view-name>" includes the corresponding column that is updatable. A column cannot be changed from updatable to read only in a typed view hierarchy.

The statement cannot be processed.

Action: Change the CREATE VIEW statement so that the column of the subview "<view-name>" is updatable or drop the superview(s) and recreate them using the READ ONLY clause to force the column to be read only.

sqlcode: -20057

sqlstate: 428EB



SQL20058N The fullselect specified for the summary table "<table-name>" is not valid.

Cause: The summary table definition has specific rules regarding the contents of the fullselect. Some rules are based on the summary table options (REFRESH DEFERRED or REFRESH IMMEDIATE) while others are based on whether or not the table is replicated. The fullselect in the CREATE TABLE statement that returned this condition violates at least one of the rules as described in the SQL Reference.

The statement cannot be processed.

Action: Change the fullselect in the CREATE TABLE statement so that so that it conforms to the rules based on the summary table options and whether or not the summary table is replicated.

sqlcode: -20058

sqlstate: 428EC



SQL20059W The summary table "<table-name>" may not be used to optimize the processing of queries.

Cause: The summary table is defined with REFRESH DEFERRED and a fullselect that is currently not supported by the database manager when optimizing the processing of queries. The rules are based on the summary table options (REFRESH DEFERRED or REFRESH IMMEDIATE). The fullselect in the CREATE TABLE statement that returned this condition violates at least one of the rules as described in the SQL Reference.

The summary table is successfully created.

Action: No action is required. If the summary table was intended for use in optimizing the processing of queries, redefine the fullselect to ensure that it is a subselect that includes a GROUP BY clause.

sqlcode: +20059

sqlstate: 01633




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

[ DB2 List of Books | Search the DB2 Books ]