Message Reference

SQL20000 - SQL20099

SQL20005NThe 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

SQL20010NMutation 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

SQL20011NTransform 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

SQL20012NType "<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

SQL20013NThe 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

SQL20014NThe 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.

1
There can only be one parameter for a FROM SQL transform function.

2
The parameter of a FROM SQL transform function must be of type "<type-name>".

3
The RETURNS data type of a TO SQL transform function must be of type "<type-name>".

4
The RETURNS type of a FROM SQL transform function that returns a scalar must be a built-in data type other than DECIMAL.

5
All of the RETURNS types of a FROM SQL transform function that returns a scalar must be built-in data types other than DECIMAL.

6
There must be at least one parameter for a TO SQL transform function.

7
The parameter types for a TO SQL transform function must all be built-in data types other than DECIMAL.

8
The TO SQL transform function must be a scalar function.

9
The FROM SQL transform function must be written using LANGUAGE SQL, or must use another FROM SQL transform function that is written using LANGUAGE SQL.

10
The TO SQL transform function must be written using LANGUAGE SQL or use a TO SQL transform function that is written using LANGUAGE SQL.

The statement cannot be processed.

User Response:

1
Specify a FROM SQL transform function with a signature that has only one parameter.

2
Specify a FROM SQL transform function where the type of the parameter is the same as "<type-name>".

3
Specify a TO SQL transform function where the RETURNS type is the same as "<type-name>".

4
Specify a FROM SQL transform function with a RETURNS type that is a built-in data type other than DECIMAL.

5
Specify a FROM SQL transform function where each element of the row has a RETURNS type that is a built-in data type other than DECIMAL.

6
Specify a TO SQL transform function with a signature that has at least one parameter.

7
Specify a TO SQL transform function where all the parameter types are built-in data types other than DECIMAL.

8
Specify a TO SQL transform function that is a scalar function.

9
Specify a FROM SQL transform function that is written using LANGUAGE SQL, or that uses another FROM SQL transform function that is written using LANGUAGE SQL.

10
Specify a TO SQL transform function that is written using LANGUAGE SQL or that uses a TO SQL transform function that is written using LANGUAGE SQL.

sqlcode: -20014

sqlstate: 428DC

SQL20015NA 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

SQL20016NThe 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

SQL20017NAddition 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

SQL20018NRow 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

SQL20019NThe 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

SQL20020NOperation "<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

SQL20021NInherited 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

SQL20022NThe 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

SQL20023NParameter "<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

SQL20024NThe 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

SQL20025NSCOPE 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

SQL20026NThe 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

SQL20027NThe 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

SQL20028NThe 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

SQL20030NAttributes 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

SQL20032NIndex 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

SQL20033NAn 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

SQL20034NThe 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

SQL20035Invalid 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

SQL20036NThe 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

SQL20037NObject 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

SQL20038NThe "<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

SQL20039NThe 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

SQL20040NNumber 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

SQL20041NNumber 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

SQL20042NThe 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

SQL20043NArgument 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:

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

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

3
The expression used as the argument is a subquery.

4
The data type of an expression used as the argument cannot be a structured type.

5
The argument of a key transformation function cannot have a data type of structured data type, LOB, DATALINK, LONG VARCHAR, or LONG VARGRAPHIC.

The statement cannot be processed.

User Response: Specify a valid argument for the function.

sqlcode: -20043

sqlstate: 428E3

SQL20044NThe 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.

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.

12
The result type of a filter function or CASE expression is not an integer data type.

13
A subquery is used in a CASE expression or as an argument of a filter function.

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

SQL20045NThe 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

SQL20046NSELECTIVITY 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

SQL20047NThe 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

SQL20048NThe 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

SQL20049NType 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

SQL20050NThe 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

SQL20051NThe 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

SQL20052NColumn "<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

SQL20053NFullselect 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.

1
A subview definition contains a common table expression, OR a branch in a subview definition does not range over a single table, view, nickname or an alias.

2
The row-set of a branch over a table-hierarchy cannot be proven by the database manager to be distinct from the row-set of all branches over the same table-hierarchy in the rest of the typed view hierarchy.

3
The first expression of a branch over a hierarchy in the root view is:

4
A table or view over which a branch of a subview ranges is not a subtable or subview of the table or view referenced in any branch of the superview and either the subview uses EXTEND AS or the root view does not have the UNCHECKED option in the REF IS clause turned on.

5
The fullselect includes references to the NODENUMBER or PARTITION functions, non-deterministic functions, or functions defined to have external action.

6
A branch in a subview cannot range over an OUTER table or view if any branch in its superview ranges over a table or view in the same hierarchy without using OUTER.

7
A subview ranges over a view in its own view hierachy.

8
A subview uses a set operation other than UNION ALL in its definition OR UNION ALL is used in the definition without specifying the UNCHECKED option in the REF IS clause of the root view.

9
A subview contains two branches of a UNION ALL that range over the same table hierarchy or view hierarchy.

10
The subview definition contains a GROUP BY or HAVING clause.

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

1
Use only one table or view in the FROM clause. Encapsulate complex selects into views that the typed view can range over using the UNCHECKED option of the root view's REF IS clause.

2
Specify a different table or view in the FROM clause of each branch that is not the same as one already used in the view hierarchy or use a predicates that clearly define the row-set for each branch as distinct compared to the row-sets for other branches 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. Consider using the UNCHECKED option in the ref is clause.

4
Specify a subtable or subview of the table or view specified in the FROM clause of a branch of the superview. Or use the UNCHECKED option in the root view definition in conjunction with the AS (without EXTEND) clause in the subview definition.

5
Remove the reference to the function from the fullselect.

6
If this is the first subview to use OUTER in a branch over this hierarchy, change the FROM clause so that OUTER is not used. If the superview uses OUTER, include OUTER in the FROM clause of the subview.

7
Do not source a subview on other views in the same hierarchy.

8
If UNION ALL was used, use the UNCHECKED option in the REF IS clause of the rootview to allow multiple branches in the subview definition. For other set operations encapsulate the set operation into a view and use the UNCHECKED option in the subview to allow sourcing on common views.

9
Unify the branches to a select over their common supertable or superview and use predicates (e.g. the type predicate) to filter for the desired rows.

10
Encapsulate the GROUP BY and HAVING clause into a view and use the UNCHECKED option in the root view to allow sourcing on common views.

sqlcode: -20053

sqlstate: 428EA

SQL20054NThe 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.

21
The table is in Datalink Reconcile Pending (DRP) state or Datalink Reconcile Not Possible (DRNP) state.

22
The function cannot be used in a generated column.
The statement cannot be processed.

User Response: The action is based on the reason code as follows.

21
Refer to the Administration Guide for information on Datalink Reconcile Pending (DRP) and Datalink Reconcile Not Possible (DRNP) states to take appropriate action.

22
Use SET INTEGRITY FOR <table-name> OFF before altering the table. Then alter the table and use SET INTEGRITY FOR <table-name> IMMEDIATE CHECKED FORCE GENERATED to generate the values for the new or altered column.
sqlcode: -20054

sqlstate: 55019

SQL20055NA 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

SQL20056NProcessing 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.

01
An inconsistency was detected between the data on the DB2 Data Links Manager and a DATALINK value in a table.

02
The DB2 Data Links Manager reached a resource limit during the processing.

99
The DB2 Data Links Manager encountered an internal processing error.

The statement cannot be processed.

User Response: The action is based on the reason code as follows.

01
Run the reconcile utility on the table.

02
The DB2 Data Links Manager administrator should identify the resource from the diagnostic logs and take corrective action.

99
Save the diagnostic logs from the DB2 Data Links Manager and the database manager and contact IBM service.

sqlcode: -20056

sqlstate: 58004

SQL20057NColumn "<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

SQL20058NThe 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

SQL20059WThe 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

SQL20060NThe 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

SQL20062NTransform 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

SQL20063NTRANSFORM 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

SQL20064NTransform 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

SQL20065NTransform 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

SQL20066NThe "<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

SQL20067NThe "<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

SQL20068NThe 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

SQL20069NThe 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

SQL20075NThe 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.

The index extension could not be created because a column returned by the GENERATE KEY function is greater than 255 bytes. The statement could not be processed. The specified index or index extension was not created, or the table could not be altered.

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

SQL20076NThe 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:

  1. The ability to execute distributed request operations against multiple data sources in a single statement.

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>":

  1. Set the DBM variable <DREQ> to ON and then restart the database manager. For a federated server, set the DBM variable <FEDERATED> to YES and then restart the database manager.
sqlcode: -20076

sqlstate: 0A502

SQL20077NCannot 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:

  1. Removing the invocation of the constructor of the type from the program.
  2. Removing any Datalink (or Reference) type attributes from the definition of the structured type (this may not be possible if there are any tables that depend on this type).
sqlcode: -20077

sqlstate: 428ED

SQL20078NHierarchy 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

SQL20080NMethod 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

SQL20081NThe 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

SQL20082NThe 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

SQL20083NThe 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

SQL20084NThe "<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

SQL20085NA 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

SQL20086NLength 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

SQL20087NDEFAULT 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

SQL20089NA 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

SQL20090WThe 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

SQL20093NThe 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.

1
The table is a typed table or hierarchy table.

2
The table is not a summary table and DEFINITION ONLY was specified.

3
The table is a replicated summary table and DEFINITION ONLY was specified.

4
The table has at least one trigger defined.

5
The table has at least one check constraint defined.

6
The table has at least one unique constraint or unique index defined.

7
The table has at least one referential constraint defined.

8
The table is referenced in the definition of an existing summary table.

9
The table is referenced directly or indirectly (through a view, for example) in the fullselect.

10
The table is already a summary table.

11
The number of columns of the existing table does not match the number of columns defined in the select list of the fullselect.

12
The data types of the columns of the existing table do not exactly match the corresponding columns in the select list of the fullselect.

13
The column names of the columns of the existing table do not exactly match the corresponding column names in the select list of the fullselect.

14
The nullability characteristics of the columns of the existing table do not exactly match the nullability characteristics of the corresponding columns in the select list of the fullselect.

15
The conversion cannot be performed if there are any other table alterations in the same ALTER TABLE statement.

User Response: The action is based on the reason code as follows.

1
The table cannot be converted to a summary table. Create a new summary table instead.

2
There is no need to convert this table. No action required.

3
A replicated table can only be a summary table. Create a new table instead.

4
Drop any triggers and try the ALTER TABLE statement again.

5
Drop any check constraints and try the ALTER TABLE statement again.

6
Drop any unique constraints and unique indexes. Try the ALTER TABLE statement again.

7
Drop any referential constraints and try the ALTER TABLE statement again.

8
Drop the summary table that references the table and try the ALTER TABLE statement again.

9
A summary table cannot reference itself. Modify the fullselect to remove the direct or indirect reference to the table being altered.

10
The operation is not allowed since the table is already a summary table.

11
Modify the fullselect to include the correct number of columns in the select list.

12
Modify the fullselect so that the result column data types exactly match the data types of the corresponding existing columns.

13
Modify the fullselect so that the result column names exactly match the column names of the corresponding existing columns.

14
The table cannot be converted to a summary table unless the nullability characteristics can be matched. Create a new summary table instead.

15
Perform the other table alterations in an ALTER TABLE statement that does not include the SET SUMMARY AS clause.
sqlcode: -20093

sqlstate: 428EW

SQL20094NThe 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


[ Top of Page | Previous Page | Next Page ]