PL/SQL (MOSC)

MOSC Banner

Trigger Error

in PL/SQL (MOSC) 5 commentsAnswered ✓

Hi there

I am using oracle 19c Database in Linux platform. during creation of trigger , I am getting the following errors:


Warning: Trigger created with compilation errors.


SQL> show error

Errors for TRIGGER SALES_CUSTOMER_TRIG:


LINE/COL ERROR

-------- -----------------------------------------------------------------

12/35  PLS-00049: bad bind variable 'NEW.BALANCE'

21/35  PLS-00049: bad bind variable 'OLD.BALANCE'

25/35  PLS-00049: bad bind variable 'NEW.BALANCE'

33/35  PLS-00049: bad bind variable 'OLD.BALANCE'


Trigger script

==============

create or replace TRIGGER sales_customer_trig

after insert or update or delete on sales_det

for each row


declare

cust_id number;


begin


 if inserting then


select customer_id into cust_id from sales_mst where inv_no=:new.inv_no;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center