Good day,
I managed to run the code below (part of my procedure) on the first run but subsequent runs have been failing with an ORA-30926: unable to get a stable set of rows in the source tables. The remedy to this is having to Remove any non-deterministic where clauses and reissue the dml but this being new with merge...any help will be appreciated.
Thanks
begin
MERGE /*+ APPEND */
INTO tb1 a
USING tb2 b
ON ( a.col1 = b.col1
AND a.col2 = b.col2)
WHEN NOT MATCHED
THEN
INSERT (a.col3,
a.col4)
VALUES (val3,
val4)
WHEN MATCHED
THEN
UPDATE SET a.col3 = a.col3 + 2;
COMMIT;
end;