Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005

    Unanswered: Insert/select on same table (no responses)

    Hi all

    I'm going a bit crazy, because I'm a new be in DB2 and the sql statement I'm
    using don't do anything. I'm recieving no response from the DB2 command prompt. If I run the qeury for my application the error is [IBM][CLI Driver][DB2/NT] SQL0952N Processing was cancelled due to an interrupt. SQLSTATE=57014. I believe the reason for the error is the fact that my DB2 command object CommandTimeout expires.

    I would appreciate it if anybody would have a look at the sql and adivise me on a better way or work around to solve the problem

    Insert into tbl_BSC_Translation Select TRAN_CODE,'pl-PL ',TRAN_ENGLISH_DESC,TRAN_TRANSLATION,TRAN_USAGE_TY PE from tbl_BSC_Translation where
    TRAN_CODE not in (Select TRAN_CODE from tbl_BSC_Translation where LANG_CODE = 'pl-PL ' with ur) and LANG_CODE = 'en-ZA

    The query works prefictly in mssql.

    Thanks Regardt

    PS. The recored amount inserted by this query is +/- 200 000 rows.

  2. #2
    Join Date
    Feb 2005
    I think the return code SQL0952N means you have interrupt the process rather than time out. Have you press <Ctrl-C> to stop the process?

    To test you SQL, may be you can fetch the first 1000 rows first by specifying 'SELECT xxxx WHERE xxx FETCH 1000 ROWS FIRST'.

  3. #3
    Join Date
    Aug 2004
    The insert after the select on the same table puts it in lockwait state unless you set TxnIsolation=1 at the client side in db2cli.ini or you use set current isolation level=UR. At the databse side if your db config parameter locktimeout is set to -1 the application will wait for ever. Your command might be getting timedout out waiting for the lock.

Posting Permissions

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