Home » Developer & Programmer » Forms » frm-40735 error occur with ora-01403
|
|
|
|
|
|
|
|
|
|
|
Re: frm-40735 error occur with ora-01403 [message #662708 is a reply to message #662701] |
Wed, 10 May 2017 02:27   |
 |
mashhoodnasir
Messages: 26 Registered: May 2017
|
Junior Member |
|
|
this is all what i am doing:
1st insert statement inserting data into DSCM_SAL BREAKUP table.
2nd insert statement inserting data into DSCM_ALLOW BREAKUP table.
Example:
BEGIN
INSERT INTO DSCM_SAL_BREAKUP SELECT E.EMP_NO, P.PAY_CD, E.B_SALARY*40/100 FROM DSCM_EMP E, DSCM_PAY_DEDUCTION P
WHERE NOT EXISTS (SELECT S.EMP_NO, S.PAY_CD, S.AMOUNT FROM DSCM_SAL_BREAKUP S WHERE S.EMP_NO = E.EMP_NO AND
S.PAY_CD = P.PAY_CD)
AND P.PAY_CD='OA-01';
INSERT INTO DSCM_ALLOW_BREAKUP SELECT E.EMP_NO, P.PAY_CD, S.AMOUNT*5/100 FROM DSCM_EMP E, DSCM_PAY_DEDUCTION P,
DSCM_SAL_BREAKUP S
WHERE NOT EXISTS (SELECT AL.EMP_NO, AL.PAY_CD, AL.AMOUNT FROM DSCM_ALLOW_BREAKUP AL WHERE AL.EMP_NO = E.EMP_NO AND
AL.PAY_CD = P.PAY_CD)
AND P.PAY_CD='MA-01';
END;
|
|
|
Re: frm-40735 error occur with ora-01403 [message #662722 is a reply to message #662708] |
Wed, 10 May 2017 03:39  |
cookiemonster
Messages: 13966 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Before we do anything else - your error message shows the constraint is in the system schema. Don't ever create objects in system or sys. They're for the oracle data dictionary and if you mess with them you might break the DB. So move all your objects out of system into a new schema right now.
Those selects are returning rows that violate the keys on your new tables. Which is to say they are returning more than one row with the same emp_no and pay_cd. Considering the complete lack of joins in the main selects that's hardly surprising.
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:22:34 CDT 2025
|