Data change table references and SQLCODE -20165

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael

    #1

    Data change table references and SQLCODE -20165

    I am trying to insert the same set of data into two tables with the
    same schema. One table is used for processing, the other for audit
    purposes. I thought that I could use the data change table reference
    FINAL TABLE to accomplish this, but I am getting a -20165 SQLCODE in
    the bind step of compilation (DB2 v8 + COBOL on z/OS). Basically, the
    statement looks like this:

    INSERT INTO AUDIT_TABLE
    SELECT * FROM FINAL TABLE (
    INSERT INTO PROCESSING_TABL E
    VALUE1, VALUE2, VALUE3
    )

    Is this simply too deeply nested?

Working...