-350 column-name WAS IMPLICITLY OR EXPLICITLY REFERENCED IN A CONTEXT IN WHICH IT CANNOT BE USED
Explanation
The SQL statement cannot be processed because it references a column in an invalid context.
- column-name
- The name of the column.
Possible reasons for this error include:
- DECFLOAT columns
- A DECFLOAT column cannot be:
- Specified as a column of the primary key in a PRIMARY KEY clause.
- Specified as a column of a UNIQUE KEY.
- Specified as a column of a foreign key in a referential-constraint clause.
- Specified as a column of a parent key in a REFERENCES clause.
- Specified as a column of a partitioning key for range partitioning.
- Defined in a table that has an EDITPROC.
- Specified as a column of an index key. Additionally, the result data type, including the intermediate result, of a key expression for an index cannot be a DECFLOAT data type or a distinct type based on a DECFLOAT data type. For an XML index, only XML columns can be specified, and the result type of the index key can be DECFLOAT.
- Specified as a column in a CREATE TABLE ORGANIZE BY HASH or ALTER TABLE ADD ORGANIZE BY HASH statement.
- LOB columns
- A LOB column cannot be:
- Defined in a temporary table (created global temporary table or declared global temporary table).
- Defined in an accelerator-only table.
- Defined in a table that has an edit procedure that is defined with row attribute sensitivity.
- Specified as a column of the primary key in a PRIMARY KEY clause.
- Specified as a column of a UNIQUE KEY.
- Specified as a column of a parent key in a REFERENCES clause.
- Specified as a column of an index key. Additionally, the result data type, including the intermediate result, of a key expression for an index cannot be a LOB data type or a distinct type based on a LOB data type. For a key-expression index, an inline LOB column is allowed as the source of the SUBSTR function expression, and the LOB data type is allowed as the intermediate result of the expression.
- Specified as a column of a partitioning key for range partitioning.
- Referenced by the definition of a column mask or a row permission.
- Defined as a column mask.
- Referenced in a period specification or period clause.
- Specified as a column in a CREATE TABLE ORGANIZE BY HASH or ALTER TABLE ADD ORGANIZE BY HASH statement.
- Hidden columns
- A hidden column cannot be specified in a key expression for an index.
- Result table columns
- A ROWID, LOB, or XML data type cannot be the data type of a column in the result table of an as-result-table clause of a CREATE TABLE or DECLARE GLOBAL TEMPORARY TABLE statement.
- A security label column column-name exists in the result table of the as-result-table clause; however, it is not the only security label column in that result table. A table can be defined only with a single security label column.
- Security label columns
- A security label column cannot be:
- Specified as a column of a foreign key in a referential-constraint clause.
- Specified in a REFERENCES clause.
- Specified in a key expression for an index.
- Timestamp with time zone columns
- A timestamp with time zone column cannot be specified as a column of a partitioning key for range partitioning.
- VARBINARY columns
- A VARBINARY column can not be specified as a column of an index key when DESC is also specified.
- XML columns
- An XML column cannot be:
- Specified as a column of the primary key in a PRIMARY KEY clause.
- Specified as a column of a UNIQUE KEY.
- Specified as a column of a foreign key in a referential-constraint clause.
- Specified as a column of a parent key in a REFERENCES clause.
- Specified as a column of a partitioning key for range partitioning.
- Defined in a temporary table (created global temporary table or declared global temporary table).
- Defined in a table that has an edit procedure that is defined with row attribute sensitivity.
- Specified as a column of an index key. Additionally, the result data type, including the intermediate result, of a key expression for an index cannot be an XML data type. For an XML index, only XML columns can be specified, and the result type of the index key can be DECFLOAT.
- Specified with the SET DEFAULT or DROP DEFAULT clause.
- Referenced by the definition of a column mask or a row permission.
- Defined as a column mask.
- Specified as a column in a CREATE TABLE ORGANIZE BY HASH or ALTER TABLE ADD ORGANIZE BY HASH statement.
- DOCID columns
- A DOCID column cannot be specified in the following:
- An ALTER TABLE statement in an ALTER COLUMN clause.
System action
The statement cannot be processed.
Programmer response
Correct the syntax, and resubmit the statement.
SQLSTATE
42962