ignore insert errors within a merge statement?
Hello all,
I wonder if it is possible somehow to ignore failures regarding the insert statement within a bulk merge statement? The error encountered is the violation of a primary key. What happens is that different transactions share the same plsql procedure. Therefore, it could happen that different transactions will try to insert two rows with the same primary key.
MERGE INTO table
USING collection
ON (table.id = collection.id)
WHEN MATCHED THEN
UPDATE ..
WHEN NOT MATCHED THEN
INSERT ... -> it can fail for duplicates here
Would the only workaround be to use "bulk update + bulk insert (ignore errors)" instead of a bulk merge?
Any help is very much appreciated,
wf