Solved

ORA-30926: unable to get a stable set of rows in the source tables

Posted on 2013-01-30
4
1,401 Views
Last Modified: 2013-01-31
Hi,

I am doing a merge into statement across a database link and keep getting the ORA-30926 error: My merge into statement is below:
Any ideas - thanks for looking;

MERGE INTO sku_invn a
     USING sku_invn@wmsp b
        ON (a.sku_id = b.sku_id AND a.whse = b.whse)
WHEN MATCHED
THEN
   UPDATE SET
              a.INVN_TYPE = b.INVN_TYPE,
              a.PROD_STAT = b.PROD_STAT,
              a.BATCH_NBR = b.BATCH_NBR,
              a.SKU_ATTR_1 = b.SKU_ATTR_1,
              a.SKU_ATTR_2 = b.SKU_ATTR_2,
              a.SKU_ATTR_3 = b.SKU_ATTR_3,
              a.SKU_ATTR_4 = b.SKU_ATTR_4,
              a.SKU_ATTR_5 = b.SKU_ATTR_5,
              a.CNTRY_OF_ORGN = b.CNTRY_OF_ORGN,
              a.QTY_ON_HAND = b.QTY_ON_HAND,
              a.QTY_NOT_ALLOC = b.QTY_NOT_ALLOC,
              a.QTY_ALLOC = b.QTY_ALLOC,
              a.QTY_SOFT_ALLOC = b.QTY_SOFT_ALLOC,
              a.QTY_IN_INTRAN = b.QTY_IN_INTRAN,
              a.MGMT_ALLOC_INVN = b.MGMT_ALLOC_INVN,
              a.QTY_ALLOC_TO_BLNKT = b.QTY_ALLOC_TO_BLNKT,
              a.QTY_IN_WIP = b.QTY_IN_WIP,
              a.QTY_TO_BE_ALLOC = b.QTY_TO_BE_ALLOC,
              a.CREATE_DATE_TIME = b.CREATE_DATE_TIME,
              a.MOD_DATE_TIME = b.MOD_DATE_TIME,
              a.USER_ID = b.USER_ID
WHEN NOT MATCHED
THEN
   INSERT     (WHSE,
               SKU_ID,
               INVN_TYPE,
               PROD_STAT,
               BATCH_NBR,
               SKU_ATTR_1,
               SKU_ATTR_2,
               SKU_ATTR_3,
               SKU_ATTR_4,
               SKU_ATTR_5,
               CNTRY_OF_ORGN,
               QTY_ON_HAND,
               QTY_NOT_ALLOC,
               QTY_ALLOC,
               QTY_SOFT_ALLOC,
               QTY_IN_INTRAN,
               MGMT_ALLOC_INVN,
               QTY_ALLOC_TO_BLNKT,
               QTY_IN_WIP,
               QTY_TO_BE_ALLOC,
               CREATE_DATE_TIME,
               MOD_DATE_TIME,
               USER_ID)
       VALUES (b.WHSE,
               b.SKU_ID,
               b.INVN_TYPE,
               b.PROD_STAT,
               b.BATCH_NBR,
               b.SKU_ATTR_1,
               b.SKU_ATTR_2,
               b.SKU_ATTR_3,
               b.SKU_ATTR_4,
               b.SKU_ATTR_5,
               b.CNTRY_OF_ORGN,
               b.QTY_ON_HAND,
               b.QTY_NOT_ALLOC,
               b.QTY_ALLOC,
               b.QTY_SOFT_ALLOC,
               b.QTY_IN_INTRAN,
               b.MGMT_ALLOC_INVN,
               b.QTY_ALLOC_TO_BLNKT,
               b.QTY_IN_WIP,
               b.QTY_TO_BE_ALLOC,
               b.CREATE_DATE_TIME,
               b.MOD_DATE_TIME,
               b.USER_ID);
0
Comment
Question by:hraja77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 38834527
This error can come in the merge statement due to dupliate data in the tables. Can you verify whether there are any duplicates.

also have a look at this url

http://www.orafaq.com/forum/t/82086/2
0
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 500 total points
ID: 38834606
or instead of using "USING sku_invn@wmsp b", try with an inline view "USING (select ... from .. where ... ) " followed by ON (..)

just ensure that the inline view you are creating can pick up the data without duplicates after which your merge should be able to work fine. test it out.

Thanks
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 38834619
http://stackoverflow.com/questions/2337271/ora-30926-unable-to-get-a-stable-set-of-rows-in-the-source-tables - an example of how to use an inline view in the merge is shown in this url.
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 38838781
Good and thanks
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question