ORA-30926 occurs only with PARALLEL hint on MERGE statement [message #588536] |
Wed, 26 June 2013 06:48  |
 |
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
|
|
|
|