SQL20005N The internal identifier limit for object type "<type>" has been exceeded.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: A transform for type "<type-name>" is already defined to perform "<transform-type>" transforms.
The statement cannot be processed.
User Response: 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.
Explanation: There are no transforms defined for "<type-name>" that meet the criteria of the DROP TRANSFORM request.
The statement cannot be processed.
User Response: 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>".
Explanation: 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 view 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.
User Response: 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>".
Explanation: 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.
The statement cannot be processed.
User Response: Specify a valid function for the type of transform.
sqlcode: -20014
sqlstate: 428DC
SQL20015N "<transform-type>" transform for type "<type-name>" is not defined.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: The maximum number of levels in a type hierarchy is 99. Adding this type would exceed the maximum.
The statement cannot be processed.
User Response: 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.
Explanation: The function is a defined to return a single row. The result of the processing the function is more than one row.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: The operation identified by "<operation-type>" cannot be performed on a typed tables.
The statement cannot be processed.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: The scope for the reference column "<column-name>" cannot be added because it is already defined.
The statement cannot be processed.
User Response: 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.
Explanation: A reference type parameter should not have a scope defined when used with external or sourced user defined functions.
The statement cannot be processed.
User Response: 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>".
Explanation: 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.
User Response: 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.
Explanation: There are two possible causes:
The statement cannot be processed.
User Response: 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.
Explanation: The statement requires a structured type, but the non-structured type "<type-name>" was used.
The statement cannot be processed.
User Response: 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.
Explanation: 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.
User Response: 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 The table or view "<table-name>" cannot have a different schema name from the other tables or views in the same hierarchy.
Explanation: 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.
User Response: Verify that the schema name of the table or view is correct. If a hierarchy name is specified, verify that its schema name matches the schema name of the root table or view. If a subtable is being created, verify that it is being created under the correct supertable. If a subview is being created, verify that it is being created under the correct superview.
sqlcode: -20028
sqlstate: 428DQ
SQL20029N "<operation>" cannot be applied to a subtable.
Explanation: The operation "<operation>" was applied to a table that is not the root of a table hierarchy.
The statement cannot be processed.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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 structured data type hierarchy that includes the data type "<left-type-name>" of the left operand of the TYPE predicate.
Explanation: 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.
User Response: 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>".
Explanation: The left operand of the dereference operator in a path expression is not valid. Possible causes are:
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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>".
Explanation: 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:
The statement cannot be processed.
User Response: 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>".
Explanation: A function used in the CREATE INDEX EXTENSION statement is not valid where it is used. The reason code indicates the reason.
The statement cannot be processed.
User Response: 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>".
Explanation: An instance parameter must be one of the following data types: VARCHAR, VARGRAPHIC, INTEGER, DECIMAL, or DOUBLE.
The statement cannot be processed.
User Response: 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>".
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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>".
Explanation: 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.
User Response: Change the fullselect of the view definition based on the "<reason-code>".
sqlcode: -20053
sqlstate: 428EA
SQL20054N The table "<table-name>" is in an invalid state for the operation. Reason code = "<reason-code>".
Explanation: 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.
User Response: Action: The action is based on the reason code as follows.
sqlstate: 55019
SQL20055N A result column data type in the select list is not compatible with the defined data type for column "<column-name>".
Explanation: 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.
User Response: 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 DB2 Data Links Manager "<name>" encountered an error. Reason code = "<reason-code>".
Explanation: The processing on the DB2 Data Links Manager for the statement encountered an error as indicated by the following reason codes.
The statement cannot be processed.
User Response: The action is based on the reason code as follows.
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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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.
Explanation: 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.
User Response: 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
SQL20075N The index "<index-name>" cannot be created or altered because the length of "<column-name>" is more than 255 bytes.
Explanation: The index could not be created or altered because the key column length is greater than 255.
User Response: If creating an index, eliminate the column from the index definition. If altering a table, reduce the new column length to the permitted maximum.
sqlcode: -20075
sqlstate: 54008
SQL20076N The instance for the database is not enabled for the specificied action or operation. Reason code = "<reason-code>".
Explanation: An error has been detected at the instance level. The requested operation cannot be completed because a specified functional area was not installed or because a specified functional area was not enabled to the instance.
The following is the list of reason codes and associated functional areas you can enable at the instance level:
User Response: Enable the instance for the requested action or operation. First, install the specified functional area if it is missing. Then, enable the specified functional area. Enablement steps vary by "<reason-code>":
sqlstate: 0A502
SQL20077N Cannot construct structured type objects that have Datalink or Reference type attributes.
Explanation: An attempt was made to invoke the constructor of a structured type which has a Datalink and/or a Reference type attribute. This functionality is currently not supported.
User Response: The error can be corrected by doing one of the following:
sqlstate: 428ED
SQL20078N Hierarchy object "<object-name>" of type "<object-type>" can not be processed using operation "<operation-type>".
Explanation: The operation "<operation-type>" was attempted using a hierarchy object named "<object-name>" of type "<object-type>". This operation does not support processing of a hierarchy object.
The statement could not be processed.
User Response: Verify that the correct object name was used. For objects types TABLE or VIEW, the object must be the name of a subtable in the table or view hierarchy. In some cases, the object must specifically name the root table. For objects of type index, the name must be a name of an index created on a subtable.
sqlcode: -20078
sqlstate: 42858