Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unstable set of rows

865860May 14 2012 — edited May 15 2012
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;
This post has been answered by Galbarad on May 15 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2012
Added on May 14 2012
6 comments
2,774 views