Start of change

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

Explanation

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

expression-number
The number of the invalid column or 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 column or key expression is different than the CCSID encoding scheme of the table.
12
Start of changeThe SUBSTR 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.End of change
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.
15
References a global variable.
25
A specification for an index on an EBCDIC table includes one or more Db2 11 Unicode columns and one or more Db2 12 or later Unicode columns. For more information, see Unicode columns in EBCDIC tables.
Start of change116End of change
Start of changeIn an invocation of the JSON_VAL built-in function in a key-expression for an index, the third argument of the function must end in ':na', to indicate that the first argument does not contain a JSON array.End of change
Start of change117End of change
Start of changeIn an invocation of the JSON_VAL built-in function in a key-expression for an index, if the first argument of the function is a column, that column must be contained in a table in a partition-by-growth table space.End of change
Start of change118End of change
Start of changeIf there is an invocation of the JSON_VAL built-in function in a key-expression for an index, the CREATE INDEX statement must not reference a LOB column other than the LOB column that is the argument to the JSON_VAL function. Such a CREATE INDEX statement can refer only to a single LOB column.End of change
Start of change119End of change
Start of changeIf a key-expression for an index contains an invocation of the JSON_VAL function, the invocation must be the outermost expression for key-expression.End of change

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