cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC DELETE statement usage

Former Member
0 Kudos

Hello All,

Scenario BW to ORACLE

I have to write a JDBC delete statement and then insert in two message mappings

This is to delete the table records before inserting

And in the interface determination, maintain order time and give the order delete first and then insert

These are all done and in the receiver CC, I have unchecked key tags mandatory. and concurrence 10

Now, I am getting an error "unique constraint violation when executed the interface

Any idea what does this error means and this error comes under delete interface execution and the insert interface portion is on hold status in message monitoring of RWB

thx

mike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The error goes like this "unique constraint violation ora-000001 c_4567353 something like this

Is this ringing any bell?

-mike

anupam_ghosh2
Active Contributor
0 Kudos

Hi Mike,

The error you are getting cannot be generated from DELETE statement.This error is given by oracle when an UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.

you have to either remove the unique restriction or do not insert the key.

This means insert operation is taking place before DELETE. You need to prevent that.

Regards

Anupam

Former Member
0 Kudos

Thx guys

Special thanks to anupam

issue is resolved and awared points

you guys rock

thx

mike

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

instead of two msg mapping, have one msg mapping and in its target msg structure have delete statement followed by insert statement. this will lead to no use of maintain order at runtime in interface determination. moreover, this will ensure delete is done first and then insert is done second, which shall solve your purpose.

moreover in your delete structure, have in keys the primary fields and their values, so that only needed records get deleted from your table.