Start of change

-356   KEY EXPRESSION expression-number IS NOT VALID, REASON CODE = reason-code

Explanation

The CREATE INDEX statement cannot be processed because a key expression is not valid.

expression-number
The number of the invalid key expression.
reason-code
A numeric value that indicates the reason for the failure.
1
Contains a subquery.
2
Does not contain at least one reference to a column.
3
References a special register.
4
Includes a CASE expression.
5
Includes a user-defined function.
6
Appears more than once in the index.
7
References a qualified column name.
8
References a column that is defined with a FIELDPROC.
9
References the LOWER or UPPER function without a locale name or the input string-expression is FOR BIT DATA.
10
References the TRANSLATE function without an output translation table.
11
The encoding scheme of the result of a key-expression is different than the CCSID encoding scheme of the table, or some of the keys (columns or key expressions) are not Unicode.
12
The built-in function is allowed to reference the inline portion of a LOB column in the specified context. In addition, the START and LENGTH arguments of the SUBSTR function must be constants.
13
References one of the following built-in functions:
  • VERIFY_GROUP_FOR_USER
  • VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER
  • VERIFY_ROLE_FOR_USER.
14
Contains an expression that requires the use of an implicit time zone value. For example, the key expression might include an explicit cast of a TIMESTAMP WITHOUT TIME ZONE value to a TIMESTAMP WITH TIME ZONE value.
116
The expression must end in ':na'.
117
The expression is a function invocation for which the first argument is a column that is contained in a table that is not in a partitioned by growth table space. In the specified context, the argument must be column that is contained in a table that is in a partitioned by growth table space.
118
The expression is a function invocation for which the first argument is a LOB column, and the statement is a CREATE INDEX statement that references another LOB column. In this context only a single LOB column can be referenced.
119
The expression is a function invocation for which the function invocation must be the outermost expression for the key expression.

System action

The statement cannot be processed.

Programmer response

Correct the error in the key expression, and reissue the statement.

SQLSTATE

429BX

End of change