Trigger Error
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;