-134 IMPROPER USE OF A STRING, LOB, XML, OR ARRAY VALUE

Explanation

The SQL statement references a string, LOB, XML value, or an array with elements that are defined as LOBs, that is not valid in the context that was specified.

This error can be issued when the length attribute of a string value is too long for the context in which it is used. The string value that you specified is invalid for one of the following reasons:
  • A string value with a length attribute greater than 255 bytes is not allowed in a SELECT list that also specifies DISTINCT.
  • A string value with a length attribute greater than 255 bytes is not allowed for a string representation of a number.
  • A string value with a length attribute greater than 16000 bytes is not allowed for a sort operation such as an ORDER BY clause.
  • A string value with a length attribute greater than 32704 bytes is not allowed as an argument to the REPLACE function.
This error can also be issued when:
  • LOB or XML values are specified in a context in which they are not allowed. The LOB or XML value that you specified is invalid for one of the following reasons:
    • A LOB or an XML value is not allowed in an ORDER BY clause.
    • A LOB or an XML value is not allowed in a check constraint.
  • An array type with LOB elements is specified in a context in which it is not allowed. The array type that you specified is invalid for one of the following reasons:
    • The array type that was specified is invalid because an array type with LOB elements is not allowed as a parameter data type for a procedure defined with the AUTONOMOUS option.
    • The ARRAY_AGG function returned an array of LOBs, and the query in which ARRAY_AGG was invoked also contained a GROUP BY clause.

A token might be returned with the name of the column or special register that resulted in the error. The nature of the error and the syntax in which it occurred determines whether a token is returned.

System action

The statement cannot be processed.

Programmer response

Db2 does not support the requested operation on the string, LOB, or XML value.

SQLSTATE

42907