cancel
Showing results for 
Search instead for 
Did you mean: 

Checking registers while insert into an Oracle DB

Former Member
0 Kudos

Hi everyone

I have a Synchronous Interface that inserts registers into an Oracle DB and returns how many registers it inserted.

But now the functional consultant told me that the interface need to check that the registers that he is sending doesn´t exist in the DB, if anyone exists in the DB, the interface has to insert the other ones but not the duplicated one.

(This is with the intention of No Duplicate info in case that someone sends it more than once)

Do anyone know how can I check this??

Or can somebody give me some light about that??

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

There 2 way to achieve this

1 Write Stored Procedure that check record and then insert.

2 You can use Action Insert_Update in Receiver JDBC structure that insert row only,if not exist.

Former Member
0 Kudos

Hi

As VJ said write a stored procedure.

If not allowed to do that then you can try to do an insert update. Update same rows and insert which are not there.

Moreover Delete and insert can be a case but it can have issues with some cases where you get system failure or something. because DB can be committed after delete and it will cause loss of data.

Thanks

Gaurav

VijayKonam
Active Contributor
0 Kudos

Write an SP on ORacle side. That will be the best way to do it.

VJ