Home > database >  Oracle always prompt assignment error when creating the trigger, won't compile
Oracle always prompt assignment error when creating the trigger, won't compile

Time:10-01

The CREATE OR REPLACE the TRIGGER "FE_APP5" update_certificates
AFTER the INSERT OR UPDATE OR DELETE
ON CERTIFICATES_TOBORROW
FOR EACH ROW
DECLARE
CbloanFlag VARCHAR2 (2);
The BEGIN
IF DELETING THEN
CbloanFlag:='0';
The ELSE
CbloanFlag:=: old. SPFLAG;
END the IF;
The UPDATE CERTIFICATES_BASEINFOR SET CBLOAN=: cbloanFlag WHERE CBID=: OLD. CTCBID;
END;


I wrote the above period of SQL, the purpose is to create a trigger to change CERTIFICATES_BASEINFOR
But I perform the SQL, oracle has been prompted the cbloanFlag:='0'; PLS - 00049: the wrong assignment variables' CBLOANFLAG '

CodePudding user response:

Trouble great god points a little time to help me take a look at exactly what went wrong, I'm from baidu Google in the morning to now, is really don't understand exactly what went wrong

CodePudding user response:

Have a great god in? Please, online, etc., very urgent

CodePudding user response:

Someone in? First etc.

CodePudding user response:

The UPDATE CERTIFICATES_BASEINFOR SET CBLOAN=cbloanFlag WHERE CBID=: old. CTCBID;

CTCBID, this field, you determine in table CERTIFICATES_TOBORROW?
  • Related