Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger Error

user11876003Jul 29 2014 — edited Jul 30 2014

Dear Friend ,

I have wrote a trigger as below

CREATE OR REPLACE TRIGGER T_POLICY_CHANGES

AFTER

INSERT OR UPDATE

ON t_POLICY

REFERENCING NEW AS NEW OLD AS OLD

FOR EACH ROW

DECLARE

vLob Varchar2(10);

BEGIN

SELECT PRD.LOB into vLob

FROM T_POLICY POL, T_PRODUCT PRD

  WHERE POL.POL\_PRT\_PRODUCT\_ID=PRD.PRODUCT\_ID

  AND POL.POL\_POLICY\_ID=:NEW.POL\_POLICY\_ID;

if vLob='LIFE' THEN

  INSERT INTO T\_DUE\_REF\_POLICY\_CHANGES VALUES (:NEW.pol\_proposal\_number,sysdate);

end if;

END;

It was created without any errors but When update insert record in T_POLICY then getting below error Let me explain why is this and give me a solution .

ERROR.PNG

This post has been answered by RajenB on Jul 29 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2014
Added on Jul 29 2014
5 comments
127 views