0

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?

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
Thirunavukkarasu
  • 208
  • 6
  • 26
  • What are the two objects in question? The names imply that they may be synonyms for remote objects? Are these completely separate permanent tables? – Justin Cave Jun 27 '15 at 07:00
  • those are two seperate tables. – Thirunavukkarasu Jun 27 '15 at 07:08
  • Possible duplicate of this question: http://stackoverflow.com/questions/2337271/ora-30926-unable-to-get-a-stable-set-of-rows-in-the-source-tables and this one: http://stackoverflow.com/questions/28636860/oracle-merge-statement-error-ora-30926 and this one: http://stackoverflow.com/questions/24936612/ora-30926-merge-state and this one: http://stackoverflow.com/questions/21935340/ora-30926-unable-to-get-a-stable-set-of-rows-in-the-source-tables-when-merging and a few more. – krokodilko Jun 27 '15 at 10:31

1 Answers1

0

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.