Home » SQL & PL/SQL » SQL & PL/SQL » ORA-30926 occurs only with PARALLEL hint on MERGE statement (Oracle 11gR2)
ORA-30926 occurs only with PARALLEL hint on MERGE statement [message #588536] Wed, 26 June 2013 06:48 Go to next message
nixshah
Messages: 1
Registered: June 2013
Junior Member
Hi Experts,


I am writing below MERGE statement. In this cardinality between table_a and table_b is 1:2. I.e. each record in table_b corresponds to 2 records in table_a based on columns in ON clause.

Well this query throws below error.

----Error---

ORA-12801: error signaled in parallel query server P011

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


However, the same statement executes successfully when PARALLEL hint is removed altogether. (There are no duplicates in table_b based on unit,group,loc columns.)

Please sugget if anything look out of place here or possible causes.


-----Query--------
MERGE /*+ PARALLEL(8) */
     INTO  table_a a
     USING table_b b
        ON (a.unit = b.unit AND a.group = b.group AND a.loc = b.loc)
WHEN MATCHED
THEN
   UPDATE SET
      a.u_pushonly = b.u_pushonly,
      a.u_seasonind = b.u_seasonind,
      a.eff =
         CASE
            WHEN b.u_season_start_dt <> TO_DATE ('01/01/1970', 'DD/MM/YYYY')
                 OR b.u_season_end_dt <> TO_DATE ('01/01/1970', 'DD/MM/YYYY')
                 OR b.u_pushonly = 1
            THEN
               GREATEST (
                  NVL (b.u_assortment_start_dt,
                       TO_DATE ('01/01/1970', 'DD/MM/YYYY')),
                  b.u_season_start_dt)
            ELSE
               NVL (b.u_assortment_start_dt,
                    TO_DATE ('01/01/1970', 'DD/MM/YYYY'))
         END;


[EDITED by LF: slightly reformatted code, applied [code] tags]

[Updated on: Wed, 26 June 2013 07:09] by Moderator

Report message to a moderator

Re: ORA-30926 occurs only with PARALLEL hint on MERGE statement [message #588541 is a reply to message #588536] Wed, 26 June 2013 07:07 Go to previous message
Michel Cadot
Messages: 68770
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Welcome to the forum.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

Search on Metalink, iirc there is a note about this issue.

Regards
Michel
Previous Topic: regular expression
Next Topic: Sql error in pl/sql block
Goto Forum:
  


Current Time: Fri Sep 05 23:43:25 CDT 2025