Error message: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00001: unique constraint (ENVIRONMENT.TEMP_WBS_GLOBAL_PK) violated
Executed: insert into TEMP_WBS_GLOBAL( taskid, projectid, wbssequence, wbslevel, origwbslevel,origwbssequence, par_seq, nnb_seq, origpartask, orignnbtask ) ( SELECT task.prid, task.prprojectid, task.prwbssequence, task.prwbslevel, task.prwbslevel, task.prwbssequence, task.wbs_parseq, task.wbs_nnbseq , PARENTTASK.PRID, NNBTASK.PRID FROM PRTASK TASK LEFT OUTER JOIN PRTASK PARENTTASK ON PARENTTASK.PRWBSSEQUENCE = TASK.WBS_PARSEQ AND PARENTTASK.PRPROJECTID = TASK.PRPROJECTID LEFT OUTER JOIN PRTASK NNBTASK ON NNBTASK.PRWBSSEQUENCE = TASK.WBS_NNBSEQ AND NNBTASK.PRPROJECTID = TASK.PRPROJECTID WHERE TASK.PRPROJECTID = ? ) Derived from statement: insert into @temporary@( taskid, projectid, wbssequence, wbslevel, origwbslevel,origwbssequence, par_seq, nnb_seq, origpartask, orignnbtask ) ( SELECT task.prid, task.prprojectid, task.prwbssequence, task.prwbslevel, task.prwbslevel, task.prwbssequence, task.wbs_parseq, task.wbs_nnbseq , PARENTTASK.PRID, NNBTASK.PRID FROM PRTASK TASK LEFT OUTER JOIN PRTASK PARENTTASK ON PARENTTASK.PRWBSSEQUENCE = TASK.WBS_PARSEQ AND PARENTTASK.PRPROJECTID = TASK.PRPROJECTID LEFT OUTER JOIN PRTASK NNBTASK ON NNBTASK.PRWBSSEQUENCE = TASK.WBS_NNBSEQ AND NNBTASK.PRPROJECTID = TASK.PRPROJECTID WHERE TASK.PRPROJECTID = ? )
Referenced by: Using input: {@temporary@=TEMP_WBS_GLOBAL, projectId=5016052} Using dynamic SQL: tag: @temporary@ SQL:TEMP_WBS_GLOBAL
In Microsoft Edge browser, after a refresh, the unique constraint error is displayed in a pop-upThis is due to one or more duplicate PRWBSSEQUENCE values in the project.
Query 1:
select tsk.PRWBSSEQUENCE,
count(1) as HOWMANY
from PRTASK tsk
where tsk.prprojectid = 5xxxxxx
group by tsk.PRWBSSEQUENCE
having count(1) > 1
Query 2:
If the query returns results, run the following query to obtain the impacted tasks.
select * from PRTASK tsk
where tsk.prprojectid = 5xxxxxx
and tsk.PRWBSSEQUENCE = <Insert sequence ID based on query 1>