Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Unanswered: db2 global variable

    Deal All,

    Any body faced the issues like below while using global variables?

    db2 "CREATE OR REPLACE VARIABLE TEST.TABLES VARCHAR(40) DEFAULT((select tabname from syscat.tables where tabname like '%LEN'))"
    DB20000I The SQL command completed successfully.

    db2 "select TEST.TABLES from SYSIBM.DUAL"

    SQL0727N An error occurred during implicit system action type "10".
    Information returned for the error includes SQLCODE "-811", SQLSTATE "21000"
    and message tokens "". SQLSTATE=56098

    I am using v9 and fix5, not sure whts wrong here,


  2. #2
    Join Date
    Aug 2001
    Checking the error message -811 ...........

    The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row.
    One of the following caused the error:

    Execution of an embedded SELECT INTO or VALUES INTO statement resulted in a result table of more than one row.
    Execution of a scalar fullselect resulted in a result table of more than one row.
    Federated system users: this situation can be detected by federated server or by the data source.

    The statement cannot be processed.

    User response:
    Ensure that the statement contains the proper condition specifications. If it does, there may be a data problem that is causing more than one row to be returned when only one is expected.

    Federated system users: isolate the problem to the data source failing the request (refer to the Troubleshooting Guide to determine which data source is failing to process the SQL statement) and examine the selection criteria and data for that object.

    sqlcode: -811

    sqlstate: 21000
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Apr 2012
    Provided Answers: 27
    Might be a v9 issue, works fine on v9.7 fp5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts