I have a CSV batch file which will have multiple records for an MRN.
For ex:
|1|2018-05-30 11:31:22|K40.20||K40|2||MRN-1
|2|2018-05-30 11:31:22|Z41.2||Z41|2||MRN-1
I am using an iterate in my xlate which means each CSV record will go one by one to Outbound DB.
In the OB thread, there is a stored procedure created which is having delete records from DB based on the MRN & insert current records.
Now, the requirement is that, I need to delete all the existing records from the DB based on the MRN-1 & insert whatever new record comes in the CSV file for that MRN-1 even if it is more than one. In the above ex: I want both records in the DB to exist.
But, since, due to iterate, each record is going one by one, it is not inserting multiple records for the MRN-1, but overwriting it.