tags:

views:

373

answers:

0
CREATE OR REPLACE TRIGGER update_quant
AFTER INSERT ON sales
FOR EACH ROW
DECLARE
v_prod_name product.prod_name%TYPE;
BEGIN
    UPDATE despatch
    SET quantity = quantity + :new.quantity
    WHERE prod_name = v_prod_name;

END;
/

5/28 PLS-00049: bad bind variable 'NEW.QUANTITY'

How do you suggest I go about this error? I am trying to update the quantity column of the despatch table, after a new sale has been inserted into the sales table.