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 > Exception handling in a stored procedure while inserting into a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-31-11, 07:58
ashish_Gupta39 ashish_Gupta39 is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Exception handling in a stored procedure while inserting into a table

I am writing a java program in which I have to do the Insertion into a table through stored procedure . My problem is that if a duplication of the row occurrs in the table while inserting the data it will throw an exception which i should catch anyhow because on the basis of that data will be added to the list (Those data which are duplicate in the table) I am writing the codes in java.
Please show me some way to do that and please do not use cobol for that.
thanks and regards
Ashish
Reply With Quote
  #2 (permalink)  
Old 10-31-11, 09:34
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You can do that with a SQL Stored Procedure. Look in the manual for examples.

Andy
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