I have a query to Update a table with a Select from another table, This is my query:
MERGE INTO tb1 USING tb2 ON (
tb1.id = tb2.id
AND
tb2.name IS NOT NULL
AND
tb2.val = (
SELECT
MAX(val)
FROM
tb2
)
) WHEN MATCHED THEN UPDATE
SET tb1.name = tb2.name,
tb1.birthday = tb2.birthday;
But, sometimes I have this error from the logs:
ORA-30926: unable to get a stable set of rows in the source tables