Create a script named *just_lee_trg.sql* that contains the PL/SQL code to create a trigger named *books_qty_on_hand_trg*. The trigger should be set up to fire whenever the quantity on hand for a book has been updated. When the quantity on hand becomes zero, it should call the *insert_reorder* procedure and pass the ISBN for the book.
That is my code.. I m not sure where i m doing wrong
9/8 PLS-00103: Encountered the symbol "INSERT_REORDE_PP" when expecti ng one of the following: := . ( @ % ; The symbol ":=" was sub stituted for "INSERT_REORDE_PP" to continue.
10/1 PLS-00103: Encountered the symbol "END" when expecting one of the following: . ( * % & = - + ; < / > at in is mod remainder no t rem <an exponent (**)> <> or != or ~= >= <= <> and or like L IKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_ Th e symbol ";" was substituted for "END" to continue.
CREATE OR REPLACE TRIGGER books_qty_on_hand_trg AFTER UPDATE OF on_hand_quantity ON books FOR EACH ROW DECLARE CURSOR book_cur IS SELECT isbn,on_hand_quantity FROM books WHERE isbn = :NEW.isbn; BEGIN FOR book_rec IN book_cur LOOP IF book_rec.on_hand_quantity = 0 THEN CALL insert_reorde_pp (:NEW.isbn) END IF; END LOOP; END;