Start of change

-270 FUNCTION NOT SUPPORTED

Explanation

The statement cannot be processed because it violates one or more of the following restrictions:

ALTER FUNCTION statement
  • An obfuscated function cannot be altered.
ALTER INDEX or CREATE INDEX statements
  • A CREATE INDEX or ALTER INDEX statement must not specify PADDED for an XML index or an index on a VARBINARY column.
  • A CREATE INDEX or ALTER INDEX statement must not specify a column that is defined as NOT NULL when the index is defined with EXCLUDE NULL KEYS.
  • A CREATE INDEX statement must not specify UNIQUE, BUSINESS_TIME WITHOUT OVERLAPS, an XML-index-specification, or a key-expression when the index is defined with EXCLUDE NULL KEYS.
  • A CREATE INDEX statement must not specify EXCLUDE NULL KEYS when the index is a partitioning index.
  • A CREATE INDEX statement must not specify ASC, DESC, or RANDOM for an XML index.
  • A CREATE INDEX statement must not specify DESC or RANDOM if the index is an expression-based index.
  • A CREATE INDEX statement must not specify DESC, PADDED, or RANDOM for a Db2 11 Unicode column in an EBCDIC table.
  • A CREATE INDEX statement must not specify INCLUDE or CLUSTER for an expression-based index.
  • A CREATE INDEX statement must not specify a BINARY or VARBINARY column in a partitioning key.
  • Start of changeA CREATE or ALTER INDEX statement must not specify RANDOM for an index that contains a column that is defined as TIMESTAMP WITH TIME ZONE or DECFLOAT.End of change
  • A CREATE INDEX statement must specify DEFER YES for a spatial index.
  • A CREATE INDEX statement must not specify the name of a declared global temporary table.
  • A column can have one spatial index only.
  • When a spatial index is created on a column of BLOB or distinct type on BLOB, the LOB table space that stores the BLOB column must exist.
  • A spatial index cannot be altered.
  • The internal limit of 30,000 bytes for the versioned object descriptor (OBD) was exceeded. This condition can happen when an ALTER INDEX statement resulted in a new index version.
  • A CREATE INDEX DSSIZE and CREATE INDEX PART DSSIZE cannot both be specified in the same statement.

For more information, see:

ALTER PROCEDURE statement
  • An obfuscated procedure cannot be altered.
ALTER TABLE or CREATE TABLE statements
  • An ALTER TABLE statement must not attempt to alter a VARBINARY column to BINARY if that column is part of a unique index.
  • An ALTER TABLE statement must not specify a materialized query table in an ADD CLONE clause. Alter the materialized query table into a base table before altering the table.
  • An ALTER TABLE or CREATE TABLE statement can only specify the KEY LABEL clause for tables in a universal or partitioned table space.
  • An ALTER TABLE statement with the ALTER COLUMN SET DATA TYPE clause must not specify VARBINARY or BINARY for the new data type when both of the following conditions are true:
    • The column is a partitioning key column.
    • The existing data type is CHAR or VARCHAR FOR BIT DATA.
  • A materialized query table cannot be cloned for ALTER TABLE.
  • The result table of the fullselect in the as-result-table clause of a CREATE TABLE statement includes data that is encoded with different CCSID sets. The result table must not use multiple CCSID sets.
  • The internal limit of 30000 bytes for the versioned object descriptor (OBD) was exceeded. This condition can happen when an ALTER table statement results in a new table version or index version, or is executed on a versioned table.
  • INLINE LENGTH is not allowed for the LOB column because the table space is not a universal table space.
  • An ALTER TABLE statement was specified with an ADD PERIOD clause and a column mask or row permission is defined for the table. A period cannot be added to a table for which a column mask or row permission is defined.
  • The table or view that is specified in a LIKE clause must not contain a Db2 11 Unicode column in an EBCDIC table.
  • An ALTER TABLE statement must not specify an ADD PARTITION BY RANGE clause if the table is EBCDIC and it contains a Db2 11 Unicode column.
  • Start of changeAn ALTER TABLE statement must not specify an IMPLICITLY HIDDEN clause in an ADD COLUMN clause for a column that is defined as a ROWID, or a distinct type that is based on a ROWID. End of change
  • An ALTER TABLE or CREATE TABLE statement that defines a generated expression column must specify the same data type as the result type of the expression. For a column that is defined as DATA CHANGE OPERATION, CHAR(1) must be specified as the data type.
  • A CREATE TABLE statement must not contain a LIKE clause and an IN ACCELERATOR clause.
  • A CREATE TABLE statement must not contain a LIKE clause that references an accelerator-only table.
  • A CREATE TABLE statement must not contain an AS fullselect clause and an IN ACCELERATOR clause.
  • A CREATE TABLE statement must not contain an AS fullselect clause where the fullselect references an accelerator-only table.
  • A CREATE TABLE statement must not contain a materialized query definition and an IN ACCELERATOR clause.
  • A CREATE or ALTER TABLE statement must not define a Unicode column in an EBCDIC table if the table is an accelerator-only table.
  • CREATE TABLE with PAGENUM RELATIVE or in a table space with PAGENUM RELATIVE must have rows with a minimum data size of 3 bytes.
  • Start of changeAn ALTER TABLE or CREATE TABLE statement must not specify KEY LABEL clause for a table in a multi-table table space. If the table resides in a multiple-table table space, consider using the key label specification at the storage group level.End of change

For more information, see:

ALTER TABLE ALTER COLUMN SET DATATYPE statement
  • Altering the data type of a column in a table with PAGENUM RELATIVE is not allowed if it causes the minimum data size of a row to be less than 3 bytes.
ALTER TABLE DROP COLUMN statement
  • Dropping a column in a table with PAGENUM RELATIVE is not allowed if it causes the minimum data size of a row to be less than 3 bytes.
ALTER TABLESPACE statements
  • An ALTER TABLESPACE DSSIZE and ALTER TABLESPACE PART DSSIZE cannot both be specified in the same statement.
  • An ALTER TABLESPACE PAGENUM RELATIVE is not allowed when the table space has a table in which the minimum data size of the row is less than 3 bytes.
CREATE GLOBAL TEMPORARY TABLE statements
  • table or view that is specified in a LIKE clause must not contain a Db2 11 Unicode column in an EBCDIC table.

For more information, see:

DECLARE GLOBAL TEMPORARY TABLE statements
  • The result table of the fullselect in the as-result-table clause of a DECLARE GLOBAL TEMPORARY TABLE statement includes data that is encoded with different CCSID sets. The result table must not use multiple CCSID sets, other than EBCDIC and Unicode.
  • A BINARY or VARBINARY column cannot be specified in a partitioning key.
  • table or view that is specified in a LIKE clause must not contain a Db2 11 Unicode column in an EBCDIC table.
  • The LIKE clause of a DECLARE GLOBAL TEMPORARY TABLE must not reference an accelerator-only table.

For more information, see DECLARE GLOBAL TEMPORARY TABLE.

CREATE FUNCTION statements
A CREATE FUNCTION statement must not attempt to define an SQL table function with either of the following items:
  • A function body that references a column that is defined with a field procedure
  • A RETURNS clause that references a column that is defined with a field procedure.

For more information, see CREATE FUNCTION.

CREATE MASK statements
A CREATE MASK statement must not define a mask for an accelerator-only table.

For more information, see:

CREATE PERMISSION statements
A CREATE PERMISSION statement must not define a column permission for an accelerator-only table.

For more information, see CREATE PERMISSION.

CREATE PROCEDURE statement
A CREATE PROCEDURE statement must not be used to add or replace a version of an obfuscated procedure.

For more information, see CREATE PROCEDURE.

CREATE VARIABLE statements
A CREATE VARIABLE statement cannot specify a default value of the CURRENT TEMPORAL SYSTEM_TIME or CURRENT TEMPORAL BUSINESS_TIME special registers.

For more information, see CREATE VARIABLE.

CREATE VIEW or ALTER VIEW REGENERATE statements
All of the views and SQL functions that are referenced in a view definition must have the same rounding mode as the view that is being defined. SQL functions that have undefined rounding mode information are ignored during rounding mode checking.

For more information, see:

FETCH statements
A FETCH statement cannot include WITH CONTINUE or CURRENT CONTINUE within an SQL routine.

For more information, see FETCH.

GET DIAGNOSTICS statements
The STACKED keyword cannot be specified for a GET DIAGNOSTICS statement in an external SQL routine. The STACKED keyword is supported only within a native SQL routine.

For more information, see GET DIAGNOSTICS.

MERGE statements
  • A column of the source table is referenced multiple times in a modification operation of the MERGE statement. When extended indicators are in effect, a column of the source table must not be referenced more than one time in a modification operation. A modification operation is an update operation or an insert operation. Extended indicators are in effect when EXTENDEDINDICATOR(YES) is used, or when the WITH EXTENDED INDICATORS prepare attribute is specified for the MERGE statement.
  • The search-condition of the ON clause of a MERGE statement must not include an IN predicate that includes a fullselect, or a quantified predicate that includes a fullselect.
  • The matching-condition of the WHEN MATCHED or WHEN NOT MATCHED clause of a MERGE statement must not include an IN predicate that includes a fullselect, or a quantified predicate that includes a fullselect.
  • A MERGE statement that contains a delete operation cannot be used as a data-change-table-reference in the FROM clause of the outer SELECT clause of a fullselect.

For more information, see MERGE.

TRIGGER statements
  • A CREATE TRIGGER statement must not specify a view that has any of the following types of columns:
    • ROWID columns
    • LOB columns
    • XML columns
    • Defined (directly or indirectly) as identity columns
    • Security label columns
    • Row change timestamp columns
    • Row-begin columns
    • Row-end columns
    • Transaction-start-ID columns
    • Expressions
    • Columns of result tables that involve set operators
  • A CREATE [or ALTER] TRIGGER statement must not reference an accelerator-only table in the body of the trigger.
  • A CREATE TRIGGER statement with INSTEAD OF clause specified must not reference a view that references an accelerator-only table in the body of the trigger.
  • The transition variable that is specified does not support XML.
  • A CREATE TABLE statement in the body of a trigger must not define a column as a LOB or XML.
  • The statement string for a PREPARE statement must not be an ALLOCATE CURSOR statement if the PREPARE statement is issued in the body of a trigger.
  • An ALTER TRIGGER (basic) statement must not specify an option other than SECURED or NOT SECURED.
  • An ALTER TRIGGER (advanced) statement can only be dynamically prepared.
  • A CREATE TRIGGER (advanced) or ALTER TRIGGER (advanced) statement cannot be processed as a static statement.
  • An obfuscated trigger cannot be altered.

For more information, see CREATE TRIGGER (basic).

UPDATE statements:
Some UPDATE statements that modify data in a column for which a BEFORE UPDATE trigger is defined might result in this code in certain circumstances.
  • If a BEFORE UPDATE TRIGGER statement contains a SET clause for one or more columns that participate in the access path index, execution of the BEFORE UPDATE TRIGGER statement might cause the row to qualify again. This situation occurs when all of the following conditions are met:
    • Db2 is using an index access path to locate rows that qualify for update.
    • A BEFORE TRIGGER exists on the table to which the rows belong.
    • The BEFORE TRIGGER updates the values of one or more columns that participate in the access path index.

    This situation can happen with both searched updates and positioned updates (updates that use the statement UPDATE WHERE CURRENT OF CURSOR). This code is issued for statements that are susceptible to this problem, even if the data involved in the update would not cause requalification. See Programmer response for information about handling requalification errors.

Other restrictions for SQL statements:
  • Views and SQL functions that are referenced in an SQL statement must have the same rounding mode as the SQL statement. Views and SQL functions that have undefined rounding mode information are ignored during rounding mode checking.
  • In a subselect, the select list cannot contain an XML column if OLD TABLE is specified.
  • The RID built-in function and ROW CHANGE TOKEN expression must not be specified in a subselect when that subselect directly includes one of the following operators:
    • LEFT OUTER JOIN
    • RIGHT OUTER JOIN
    • FULL OUTER JOIN
  • The ROW CHANGE TIMESTAMP expression can be specified only in a subselect when the following conditions are true:
    • That subselect directly includes a LEFT OUTER JOIN, RIGHT OUTER JOIN, or FULL OUTER JOIN operator.
    • The table designator identifies a base table that contains a row change timestamp column.
  • An SQL table function must not be invoked with an expression that is derived from a column that is defined with a field procedure.
  • An input argument for an SQL table function must not contain a scalar fullselect, a function, or a column reference, either directly or as part of an expression.
  • No combination of ARRAY_AGG, LISTAGG or XMLAGG can be specified together in the same statement.
  • The SQL statement includes a use of UNNEST, and an argument to the UNNEST operator is an array function invocation that includes a reference to a column. An argument of an array function invocation must not include a reference to a column of a common table expression.
  • Start of changeA query or a SELECT INTO, INSERT, UPDATE, DELETE, or MERGE statement must not reference tables or views that include both inclusive-exclusive BUSINESS_TIME periods and inclusive-inclusive BUSINESS_TIME periods. End of change
  • Start of changeIn a DELETE or UPDATE statement, a FROM expression1 TO expression2 clause must not be specified for an inclusive-inclusive period.End of change
  • Start of change In a DELETE or UPDATE statement, a BETWEEN expression1 AND expression2 clause must not be specified for an inclusive-exclusive period. End of change
BIND PACKAGE command
A BIND PACKAGE command with the DEPLOY option must not be specified for the following situations:
  • A package for a routine that is obfuscated.
  • A package for a version of a procedure for which the CREATE PROCEDURE statement contains an OR REPLACE or SPECIFIC clause.

For more information, see BIND PACKAGE subcommand (DSN).

System action

The statement cannot be processed.

Programmer response

Correct the syntax, and resubmit the statement. For the following errors, take the specified actions.

Errors that are caused by an XML data type
If this error is caused by an XML data type, input the XML data to one of the functions that accept XML input. Store the output of the function in the database, or return it to the application.
Errors that are caused by the rounding mode
If this error is caused by different rounding modes, take one of the following actions:
If a view or SQL function has a different rounding mode than the referencing SQL statement:
Change the SQL statement or change the rounding mode in effect to make sure all the views or SQL functions that are referenced have the same rounding mode as the SQL statement. A new view, SQL function, or both might be needed to match the rounding mode of the SQL statement.
If a view or SQL function has a different rounding mode than the referencing view during execution of CREATE VIEW:
Change the view definition or change the rounding mode in effect to make sure all the views or SQL functions that are referenced have the same rounding mode as the referencing view. A new view, SQL function, or both might be needed to match the rounding mode of the referencing view.
If a view or SQL function has a different rounding mode than the referencing view during execution of ALTER VIEW REGENERATE:
Change the rounding mode in effect to make sure all the views or SQL functions that are referenced have the same rounding mode as the referencing view. The view for ALTER VIEW REGENERATE might always fail. In this case, drop and re-create the view with a different view definition that references a new view or SQL function.
Errors that are caused by the requalification of data
If the problem is caused by requalification of data that was set by a BEFORE UPDATE TRIGGER statement, take one of the following actions:
  • Ensure that the columns that are modified by the trigger are also modified by the UPDATE statement itself. Modify the UPDATE statement to include a dummy clause of the type column-name=column-name for each column that the BEFORE UPDATE TRIGGER modifies.
  • Rebind with hints to cause the RIDLIST access path to use the same index.
Errors that are caused by size of the OBDREC
If the size of the OBDREC exceeds 30,000 bytes, you might be able to reclaim some space in the OBD by reducing the size of the default value for varying-length columns, if any exist.

SQLSTATE

42997

End of change