AnsweredAssumed Answered

how to handle duplicate entries in LAC

Question asked by irfan.mugale on Dec 15, 2018
Latest reply on Jan 2, 2019 by tarma06

Hi ,


Lac Version: 3.1

User Case: Currently we are fetching three row from db1 and inserting the same in db2.

The Primary key on both the DB is the same req_id.

When we fetched the Row from db1 it gives us 100 to 1000 of records, the same needs to be inserted in the DB2.

At first, the API is executed and records are fetched and inserted in the db2.

The second time when we fetch records, there are some new records and some old records, when we insert the same it gives use below error

"statusCode": 500,
"errorCode": 5004,
"errorMessage": "Internal server error: ORA-00001: unique constraint (RCAS_NEW.PK_REQ_ID) violated\n\nrow: main:APAC_DETAILS[main:APAC_DETAILS[{REQ_ID=220348856}]] = [CRN=5898333, FT_RESPONSE_TIME=2018-12-14T06:12:24, LOAN_ACID=12345, REQ_ID=220348856, ]"


It seems that the error is due to duplicate entries we doing on the same reqid. 

What we need is that the LAC should insert the new records and discard the old records sent again.


For this scenarios, we are using the POST method to insert the record to the DB.


How we can ignore the old records sent and insert the new records?