On 25/08/2013 23:40, tim.wickett wrote:
I still get the syntax error if i have the WHERE clause after the triggered
statement.

The idea of the code was to create a new entry in the
WASTE_ITEM_LOCATION_HISTORY table every time the current_location value was
updated in the WASTE_ITEM table. However I don't want an entry if any other
value is updated. I want a history of each location an item of waste has
been stored at.

OK, so your condition should be "OLD.current_location <> NEW.current_location".
However, INSERT statements don't have a WHERE clause either. Rick's suggestion to use a procedure to insert or not seems to be the only way to do what you want.

HTH,
--
John English

Reply via email to