If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Not able to insert the record into a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-10, 19:11
surjyakp surjyakp is offline
Registered User
 
Join Date: Jan 2010
Posts: 26
Not able to insert the record into a table

Hi,
I am using below SQL statemnts in my sqc stored procedure, but it is not inserting the record into the table and not throwing any error also.
EXEC SQL INSERT INTO RQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL_ARCH SELECT * FROM PQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL WHERE SESS_NO = :cSess_no AND AML_TXN_ACKN_NO = :cAml_txn_ackn_no AND SEQ_ID = :nSeq_id ;

Same I tried through command editor like below it is inserting the record into the table.
INSERT INTO RQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL_NO_INCDNT_FSTHALF _ARCH SELECT * FROM PQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL where SESS_NO = '34324sdf' AND AML_TXN_ACKN_NO = 'asdf3424234' ND SEQ_ID = 3;

Please help me how to reslove this.

Thanks
Surjya
Reply With Quote
  #2 (permalink)  
Old 04-12-10, 20:20
tonkuma tonkuma is online now
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,194
Try,
EXEC SQL SELECT COUNT(*) INTO :xxxx FROM PQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL WHERE SESS_NO = :cSess_no AND AML_TXN_ACKN_NO = :cAml_txn_ackn_no AND SEQ_ID = :nSeq_id ;
Reply With Quote
  #3 (permalink)  
Old 04-13-10, 09:23
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I guess that your SQL statement actually succeeds, but you roll back the transaction implicitly or explicitly in your application.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #4 (permalink)  
Old 04-13-10, 09:56
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by surjyakp View Post

Same I tried through command editor
I think not. You are inserting into different tables: RQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL_ARCH and RQ5.SRVC_PLATF_SESS_TXN_ACCT_DTL_NO_INCDNT_FSTHALF _ARCH
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On