0 Replies - 1645 Views - Last Post: 21 October 2013 - 06:19 PM

#1 ImmaGrumpyOldMan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-October 13

Creating Trigger to Update Table

Posted 21 October 2013 - 06:19 PM

Hi! I'm trying to create a trigger that updates an "Invoice" table when a record in the "InvoiceLine" is updated. I see the post below me is dealing with the same database example. Here is said Schema.
Posted Image

The query below is how far I've gotten.

 Create Trigger TotalTrig after update on InvoiceLine Referencing InvoiceLine row as old new row as new  for each row when (new.Unitprice != old.Unitprice or new.Quantity != old.Quantity) Update Invoice.Total;


I keep getting an error near the referencing InvoiceLine, for reasons I do not know.
Any guidance would be much appreciated! Thanks.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1