-873 THE STATEMENT REFERENCED DATA ENCODED WITH DIFFERENT ENCODING SCHEMES OR CCSIDS IN AN INVALID CONTEXT

Explanation

The SQL statement references data from multiple encoding schemes or CCSIDs in a context where the reference is not allowed. This error can occur for one of the following reasons:
  • The definition of a new table is specified to be 'like' an existing view which references data from multiple encoding schemes.
  • The parent and child tables referenced in the definition of a referential constraint containing one or more non-numeric columns are encoded with different encoding schemes.
  • The definition of a materialized query table uses a different encoding scheme than the containing table space.
  • The SELECT statement references data that is encoded in multiple encoding schemes, and also contains an INSERT, DELETE, UPDATE, or MERGE statement that references data that is encoded with a single encoding scheme.
  • An INSTEAD OF trigger is created on a view that references multiple encodings or CCSIDs.
  • Start of changeThe GRAPHIC or VARGRAPHIC built-in function, or CAST specification, was invoked with numeric data for the first argument and the containing statement:
    • is a multiple encoding scheme statement but the application encoding scheme is not set to Unicode, or a CAST specification does not explicitly specify Unicode in the CCSID clause for the target data type.
    • is a single encoding scheme statement and the statement references tables or views that are not Unicode.

    For information about how to determine whether a context supports Unicode data, see Determining the encoding scheme and CCSID of a string.

    End of change

System action

The statement cannot be processed.

Programmer response

Correct the SQL statement.

SQLSTATE

53090