Skip to Content
avatar image
Former Member

Checking registers while insert into an Oracle DB

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 20, 2008 at 11:24 PM

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

    VJ

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 21, 2008 at 01:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 21, 2008 at 03:30 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded