Unanswered: Insert/select on same table (no responses)
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.
PS. The recored amount inserted by this query is +/- 200 000 rows.
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.