ERROR IN CREATE TRIGGER
I've looked through books, and forums and i see nothing wrong with the trigger i've created, anyone know what's wrong with the trigger and why mySql workbench is reporting errors when i try to run it...
Thanks in advance.
CREATE TRIGGER onePurchase
BEFORE UPDATE ON sale_posts
FOR EACH ROW
BEGIN
SELECT COUNT(*) INTO vpCount
FROM sale_posts
WHERE purchased_by = new.purchased_by
IF old.purchased_by = 1
raise_application_error(-20000,('Memnber' || :newrow.purchased_by || 'already purchased');
END IF;
END
Edited 1 time(s). Last edit at 04/21/2011 06:07AM by miss uniquea.
Subject
Views
Written By
Posted
ERROR IN CREATE TRIGGER
3652
April 21, 2011 06:02AM
1183
June 07, 2011 11:02AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.