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-ID>" is not allowed when the instance of the structured type is NULL. |
Explanation: The method "<method-ID>" 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.
To determine the method name associated with the "<method-ID>", use the following query:
SELECT FUNCSHEMA, FUNCNAME, SPECIFICNAME FROM SYSCAT.FUNCTIONS WHERE FUNCID = INTEGER("<method-ID>")
sqlcode: -20010
sqlstate: 2202D
SQL20011N | Transform group "<group-name>" is already defined for a subtype or supertype of data type "<type-name>". |
Explanation: A transform group called "<group-name>" already exists for a type in the same hierarchy as "<type-name>". It may be defined for a supertype or subtype of "<type-name>". A transform group name can only be used once within a structured type hierarchy.
The statement cannot be processed.
User Response: Change the name of the transform group.
sqlcode: -20011
sqlstate: 42739
SQL20012N | Type "<type-name>" does not have any associated transform groups to drop. |
Explanation: There are no transforms defined for "<type-name>". There is nothing to drop.
The statement did not drop any transform groups.
User Response: Ensure the name of the type (including any required qualifiers) is correctly specified in the SQL statement and that the type 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 | The transform group "<group-name>" "<transform-type>" transform function for type "<type-name>" is not valid. Reason code = "<reason-code>". |
Explanation: The "<transform-type>" transform function in transform group "<group-name>" is not valid. The reason is based on the "<reason-code>" as follows.
The statement cannot be processed.
User Response:
sqlcode: -20014
sqlstate: 428DC
SQL20015N | A transform group "<group-name>" is not defined for data type "<type-name>". |
Explanation: A specified transform group "<group-name>" is not defined for the data type "<type-name>". The data type "<type-name>" may have been explicitly specified in the statement or may be implicit based on the use of a structured type that requires the existence of the transform group for the data type.
If "<group-name>" is empty, either the TRANSFORM GROUP bind option or the CURRENT DEFAULT TRANSFORM GROUP special register was not specified and therefore there was no transform for "<type-name>".
The statement cannot be processed.
User Response: Define transform group "<transform-type>" for data type "<type-name>" using the CREATE TRANSFORM statement. If the error occurred when dropping the transform, no action is required because the transform group did not exist for the data type.
If "<group-name>" is empty, specify the TRANSFORM GROUP bind option on the CURRENT DEFAULT TRANSFORM GROUP special register.
sqlcode: -20015
sqlstate: 42741
SQL20016N | The value of the inline length associated with type "<type-name>" is too small. |
Explanation: The definition for structured type "<type-name>" has an INLINE LENGTH value specified that is smaller than the size returned by the constructor function (32 + 10 * number_of_attributes) for the type and is less than 292.
The statement cannot be processed.
User Response: Specify an INLINE LENGTH value that is at least the size returned by the constructor function for the type or is at least 292. If this error occurs when altering the type (or some supertype of this type) to add an attribute, either the attribute cannot be added or the type must be dropped and re-created with a larger INLINE LENGTH value.
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 or is not an instantiable structured type. |
Explanation: The statement requires a structured type that can be instantiated. The type "<type-name>" is either:
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 added or dropped when a typed table, typed view, or index extension "<object-name>" is dependent on the type. |
Explanation: The attributes of a structured type cannot be added or dropped if a typed table or typed view of the structured type or any of its subtypes currently exists. Attributes of a structured type also cannot be added or dropped when a column exists in the table that directly or indirectly uses "<type-name>". Also, attributes of a structured type cannot be added or dropped when the type "<type-name>" or one of its subtypes is used in an index extension. The table, view, or index extension "<object-name>" is one table, view, or index extension that is dependent on the structured type "<type-name>". There may be other tables, views, or index extensions 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, views, and index extensions that are dependent on the structured type "<type-name>".
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 | The "<keywords>" clause cannot be specified with the EXTEND USING clause. |
Explanation: The EXTEND USING clause in the CREATE INDEX statement cannot be specified with the "<keywords>" clause.
The statement cannot be processed.
User Response: Remove the specification of "<keywords>" clause or the EXTEND USING clause from the CREATE INDEX statement.
sqlcode: -20038
sqlstate: 42613
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 routine "<routine-name>" is not valid. Reason code = "<reason-code>". |
Explanation: The routine "<routine-name>" could be the transformation function, the range-producing function, or a routine (function or method) referenced in the FILTER USING clause. The reason code indicates 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 | The routine "<routine-name>" or the CASE expression is not valid in a CREATE INDEX EXTENSION or CREATE FUNCTION statement. Reason code = "<reason-code>". |
Explanation: A routine (function or method) "<routine-name>" used in the CREATE INDEX EXTENSION or CREATE FUNCTION statement is not valid where it is used. If "<routine-name>" is empty, then the CASE expression used for filtering is not valid. The reason code indicates the reason.
The statement cannot be processed.
User Response: If "<routine-name>" is not empty, specify a routine that conforms to the rules for a function or method specified in the specific clause of the CREATE INDEX EXTENSION or CREATE FUNCTION statement. Otherwise, specify a CASE expression that conforms to the rules for a CASE expression in the FILTER USING clause.
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
SQL20046N | SELECTIVITY clause following "<predicate-string>" can only be specified for a valid user-defined predicate. |
Explanation: The SELECTIVITY clause is specified with a predicate that does not include a valid user-defined function. A valid user-defined function includes a PREDICATES clause with a WHEN clause that matches the predicate. The SELECTIVITY clause cannot be specified except with a user-defined predicate.
The statement cannot be processed.
User Response: Remove the SELECTIVITY clause following the predicate.
sqlcode: -20046
sqlstate: 428E5
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 name in the function being created. |
Explanation: Each search target in an index exploitation rule has to match some parameter name of the function that is being created. Each search argument in an index exploitation rule must match either an expression name in the EXPRESSION AS clause or a parameter name of the function being created. Parameter names must be specified in the parameter list for the function.
The statement cannot be processed.
User Response: Specify only valid names of the function in the search target or search argument.
sqlcode: -20050
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: 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
SQL20060N | The key transform table function used by the index extension of index "<index-id>" of table "<table-id>" in "<tbspace-id>" generated duplicate rows. |
Explanation: The key transform table function specified by the GENERATE USING clause of the index extension used by index "<index-id>" generated duplicate rows. For a given invocation of the key transform table function, no duplicate rows should be produced. This error is occured when inserting or updating the key value for the index "<index-id>" of table "<table-id>" in table space "<tbspace-id>".
The statement cannot be processed.
User Response: The code for the key transform table function used by the index extension of index "<index-id>" must be modified to avoid the creation of duplicate rows.
To determine the index name, use the following query:
SELECT IID, INDSCHEMA, INDNAME FROM SYSCAT.INDEXES AS I, SYSCAT.TABLES AS T WHERE IID = <index-id> AND TABLEID = <table-id> AND TBSPACEID = <tbspace-id> AND T.TBASCHEMA = I.TABSCHEMA AND T.TABNAME = I.TABNAME
sqlcode: -20060
sqlstate: 22526
SQL20062N | Transform function "<transform-type>" in transform group "<group-name>" for type "<type-name>" cannot be used for a function or method. |
Explanation: The transform function defined in the transform group "<group-name>" for type "<type-name>" cannot be used for a function or method because the transform function is not written in SQL (defined with LANGUAGE SQL). The transform group cannot be used for this function or method.
The statement cannot be processed.
User Response: Specify a transform group for type "<type-name>" that has the transform functions defined with LANGUAGE SQL.
sqlcode: -20062
sqlstate: 428EL
SQL20063N | TRANSFORM GROUP clause must be specified for type "<type-name>". |
Explanation: The function or method includes a parameter or returns data type of "<type-name>" that does not have a transform group specified.
The statement cannot be processed.
User Response: Specify a TRANSFORM GROUP clause with a transform group name that is defined for "<type-name>".
sqlcode: -20063
sqlstate: 428EM
SQL20064N | Transform group "<group-name>" does not support any data type specified as a parameter or returned data type. |
Explanation: The transform group "<group-name>" specified in the TRANSFORM GROUP clause is not defined for any data type that is included in the parameter list or the RETURNS clause of a function or method.
The statement cannot be processed.
User Response: Remove the transform group from the function or method definition.
sqlcode: -20064
sqlstate: 428EN
SQL20065N | Transform group "<group-name>" for data type "<type-name>" cannot be used to transform a structured type for use with a client application. |
Explanation: The transform group "<group-name>" for data type "<type-name>" defines a transform function that cannot be used when performing transforms for client applications. The possible reasons for this are based on the definition of the transform function that is not supported for client applications. The unsupported transform function may be:
The statement cannot be processed.
User Response: For static embedded SQL, specify a different transform group using the TRANSFORM GROUP bind option. For dynamic SQL, specify a different transform group using the SET DEFAULT TRANSFORM GROUP statement.
sqlcode: -20065
SQL20066N | The "<transform-type>" transform function is not defined in the transform group "<group-name>" for data type "<type-name>". |
Explanation: The "<transform-type>" transform function of transform group "<group-name>" for data type "<type-name>" is required for a transform group used in a function or method definition.
The statement cannot be processed.
User Response: If creating a function or method, specify a different transform group in the function or method definition. If referencing a structured type in a dynamic SQL statement, specify a different transform group for the CURRENT DEFAULT TRANSFORM GROUP special register. Alternatively, add a "<transform-type>" transform function to the transform group "<group-name>" for data type "<type-name>".
sqlcode: -20066
sqlstate: 42744
SQL20067N | The "<transform-type>" transform function is defined more than once in the transform group "<group-name>" for data type "<type-name>". |
Explanation: A TO SQL or FROM SQL transform function can only be specified once in a transform group. The transform group "<group-name>" for data type "<type-name>" has at least two FROM SQL or TO SQL (or both) transform functions defined.
The statement cannot be processed.
User Response: Delete the TO SQL or FROM SQL definitions from "<group-name>" in the transform definition so that there is only one of each.
sqlcode: -20067
sqlstate: 42628
SQL20068N | The structured type "<type-name>" may not be defined so that one of its attribute types directly or indirectly uses itself. The attribute "<attribute-name>" causes the direct or indirect use. |
Explanation: Direct use: Type A is said to directly use type B if one of the following is true:
Indirect use: Type A is said to indirectly use type B if the following is true:
You cannot define a type so that one of its attribute types directly or indirectly uses itself. The type for attribute "<attribute-name>" is the cause of the direct or indirect use.
User Response: Evaluate the type and remove the attribute type that causes the direct or indirect use.
sqlcode: -20068
sqlstate: 428EP
SQL20069N | The RETURNS type of the "<routine-type>" "<routine-name>" is not the same as the subject type. |
Explanation: The method "<method-name>" specifies SELF AS RESULT. The RETURNS data type of the method must be the same as the subject data type of the method.
User Response: Change the RETURNS type of the method "<method-name>" to match the subject type.
sqlcode: -20069
sqlstate: 428EQ
SQL20075N | The index or index extension "<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. If creating an index extension, specify a different GENERATE KEY function, or redefine the function to eliminate the column.
sqlcode: -20075
sqlstate: 54008
SQL20076N | The instance for the database is not enabled for the specified 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 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. In Version 6.1 or earlier, this error may also be issued for a structured type object with a Reference type attribute.
The statement cannot be processed.
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
SQL20080N | Method specification for "<method-name>" cannot be dropped because a method body exists. |
Explanation: The method specification "<method-name>" still has an existing method body that must be dropped before the method specification can be dropped.
The statement cannot be processed.
User Response: Use the DROP METHOD statement with the same method specification to drop the method body and then issue the ALTER TYPE statement again to drop the method specification.
sqlcode: -20080
sqlstate: 428ER
SQL20081N | The method body cannot be defined for a LANGUAGE "<language-type>" method specification "<method-name>". |
Explanation: The method specification"<method-name>" is defined with LANGUAGE "<language-type>". If the LANGUAGE is SQL, the method body must be an SQL control statement. For other languages, the EXTERNAL clause must be specified.
The statement cannot be processed.
User Response: Change the method body to match the LANGUAGE specified in the method specification.
sqlcode: -20081
sqlstate: 428ES
SQL20082N | The dynamic type "<expression-type-id>" of the expression is not a subtype of the target data type "<target-type-id>" in a TREAT specification. |
Explanation: The dynamic data type of the result of the expression specified in the TREAT specification is "<expression-type-id>". The specified target data type "<target-type-id>" is a proper subtype of "<expression-type-id>" which is not allowed.
The statement cannot be processed.
User Response: Change the "<target-type-id>" of the TREAT specification to a supertype of "<expression-type-id>" or change the expression so that the dynamic data type of the result is a subtype of "<target-type-id>".
To determine the data type names for "<expression-type-id>" and "<target-type-id>", use the following query:
SELECT TYPEID, TYPESCHEMA, TYPENAME FROM SYSCAT.DATATYPES WHERE TYPEID IN INTEGER( "<expression-type-id>"), INTEGER("<target-type-id>"))
sqlcode: -20082
sqlstate: 0D000
SQL20083N | The data type of the value returned by "<routine-type>" "<routine-id>" does not match the data type specified as RESULT. |
Explanation: The method "<routine-id>" specifies SELF AS RESULT and therefore requires that the data type of the value returned must be the same as the subject data type used to invoke the method. The RETURN statement in either the SQL method body or in the TO SQL transform function for the type of an external method resulted in the incorrect data type.
The statement cannot be processed.
User Response: Change the RETURN statement of the method or transform function to ensure that the data type of the returned value is always the subject type used to invoke the method.
To determine the routine name associated with the "<routine-id>", use the following query:
SELECT FUNCSCHEMA, FUNCNAME, SPECIFICNAME FROM SYSCAT.FUNCTIONS WHERE FUNCID = INTEGER("<routine-id>")
sqlcode: -20083
sqlstate: 2200G
SQL20084N | The "<routine-type>" "<routine-name>" would define an overriding relationship with an existing method. |
Explanation: A method MT, with subject type T, is defined to override another method MS, with subject type S, if all of the following conditions are true:
No method may override, or be overridden by, another method. Furthermore, a function and a method may not be in an overriding relationship. This means that if the function were a method with its first parameter as subject S, it must not override another method of any supertype of S and it must not be overriden by another method of any subtype of S.
The statement cannot be processed.
User Response: Change the routine that is being defined to use a different routine name than "<routine-name>" or change the parameters of the routine.
sqlcode: -20084
sqlstate: 42745
SQL20085N | A routine defined with PARAMETER STYLE JAVA cannot have structured type "<type-name>" as a parameter type or as the returns type. |
Explanation: A routine is defined with PARAMETER STYLE JAVA and one of the parameter types or a returns type is defined using the structured type "<type-name>". This is not supported by this version of DB2.
The statement cannot be processed.
User Response: Change to a different parameter style for the routine or remove the structured type from the routine definition.
sqlcode: -20085
sqlstate: 429B8
SQL20086N | Length of the structured type value for a column exceeds the system limit. |
Explanation: The value for a structured type column exceeds 1 gigabyte in overall size, including descriptor data for the instance. The column could be one that is being inserted or updated directly or it may be a column that is generated.
The statement cannot be processed.
User Response: Reduce the size of the structured type value that is being assigned to the column.
sqlcode: -20086
sqlstate: 54049
SQL20087N | DEFAULT or NULL cannot be used in an attribute assignment. |
Explanation: The UPDATE statement is using an attribute assignment to set the value of an attribute in a structured type column. This form of assignment statement does not allow the use of the keyword DEFAULT or the keyword NULL as the right hand side of the assignment.
The statement cannot be processed.
User Response: Specify an expression for the right hand side of the attribute assignment or change the assignment so it is not using the attribute assignment syntax.
sqlcode: -20087
sqlstate: 428B9
SQL20089N | A method name cannot be the same as a structured type name within the same type hierarchy. |
Explanation: A specified method name is the same as the structured type which is defined for one of the supertypes or subtypes of the structured type.
The statement cannot be processed.
User Response: Specify a different name for the method.
sqlcode: -20089
sqlstate: 42746
SQL20090W | The use of the structured type having attribute "<attribute-name>" of type DATALINK is effectively limited to the type of a typed table or type view. |
Explanation: The attribute "<attribute-name>" is defined with a type of DATALINK or a distinct type based on a DATALINK. A structured type that includes such an attribute can only be used as the type of a table or view. If used as the type of a column of a table or view it can only be assigned the null value.
The statement continued processing.
User Response: Consider the intended use of the structured type. If the type will be used as a column data type, then remove the attribute "<attribute-name>" from the structured type or use a data type other than DATALINK for the attribute.
sqlcode: +20090
sqlstate: 01641
SQL20093N | The table "<table-name>" cannot be converted to or from a summary table. Reason code = "<reason-code>". |
Explanation: The ALTER TABLE statement is being used to change a table from a summary table to DEFINITION ONLY or to convert a regular table to a summary table. The ALTER TABLE statement failed as indicated by the following reason codes.
User Response: The action is based on the reason code as follows.
sqlstate: 428EW
SQL20094N | The column "<column-name>" is GENERATED using an expression and cannot be used in the BEFORE trigger "<trigger-name>". |
Explanation: The value for column "<column-name>" is generated using an expression and cannot be named in the column name list of a BEFORE UPDATE trigger or referenced as a new transition variable in a BEFORE trigger.
User Response: Remove the reference to "<column-name>" in the trigger "<trigger-name>".
sqlcode: -20094
sqlstate: 42989