PLS-00049: bad bind variable problem
409873Nov 27 2003 — edited Nov 28 2003I am writing a trigger, before I delete a patron, i have to check if the patron already returned all library books. the code like:
create or replace trigger patron_bef_del_row
before delete on BORROWERS
for each row
declare
num integer := 0;
cursor plc is
select *
from BOOK_LOANS
where card_id = :old.card_id;
----
I got:
Warning: Trigger created with compilation errors.
SQL> show errors
Errors for TRIGGER PATRON_BEF_DEL_ROW:
LINE/COL ERROR
-------- ---------------------------------------------
7/19 PLS-00049: bad bind variable 'OLD.CARD_ID'
What is wrong, please help and thanks!