خرید بک لینک

Vote count: 0

How can i create a trigger named ProductMaint that update Quantity in my Inventory after selling and updating order table .Unique Product is found in both order placed and Inventory by unifying two rows i.e Manufacturer and product name . How can i trigger it without any error ?? I have done it but error is prompting invalid bind variable

  CREATE OR REPLACE TRIGGER ProductMaint
  AFTER INSERT ON Orders
  FOR EACH ROW
  WHEN(NEW.Qty >0)
  BEGIN
  UPDATE Products
  SET Qtyonhand = Qtyonhand - :NEW.Qty
  WHERE Products.Mfr =Orders.Mfr
  AND Products.Product =Orders.Product;
  DBMS_OUTPUT.PUT_LINE(:New.Qtyonhand);    

 END;
 /

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 27 فروردين 1395 ساعت: 4:12

صفحه بندی