Unable to get a stable set of rows in the source tables?

1.6k views Asked by At

When I using merge statement, I got the error.

Error code 30926, SQL state 99999: ORA-30926: unable to get a stable set of rows in the source tables

Here my query:

merge into dept_fc_link l 
using 
(select distinct dept_id,f_id,stk_point from temp_dept_fc_link) t 
on (l.dept_id = t.dept_id) 
when matched then 
update set l.stk_point = t.stk_point 
when not matched then 
insert(l.dept_id,l.f_id,l.stk_point) values(t.dept_id,t.f_id,t.stk_point);

Can point out my mistake?

1

There are 1 answers

0
Christian Arias On

Usually this kind of error happend when you have duplicates in the query, in other words query in the using clause returns more than 1 row for the joining condition in on clause. I don't know your data, but its a good guess.