frm-40735 error occur with ora-01403 [message #662529] |
Fri, 05 May 2017 03:53 |
|
mashhoodnasir
Messages: 26 Registered: May 2017
|
Junior Member |
|
|
I am trying to concatenate two form items and want to show their output in other item using following statement but FRM-40735 error occur. kindly help me regarding this
BEGIN
SELECT nvl(:F_NAME,'') ||' '||nvl(:L_NAME,'') INTO :FU_NAME FROM EMP;
NEXT_ITEM;
END;
|
|
|
|
|
|
|
|
Re: frm-40735 error occur with ora-01403 [message #662616 is a reply to message #662545] |
Mon, 08 May 2017 02:56 |
cookiemonster
Messages: 13961 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I did tell you what it should be:
cookiemonster wrote on Fri, 05 May 2017 10:44
It should be a straight PL/SQL assignment.
but apparently LF had to spell it out.
Selects are for getting data from tables. If you don't need to get data from a table don't use a select.
*Exception to that is when you want to use a function that's only available in SQL and not in PL/SQL - in which case you should use a select from dual (no other table). Almost all functions exist in PL/SQL though.
|
|
|
|
|
|
|
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: 13961 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.
|
|
|