MySQL Forums
Forum List  »  Triggers

Re: ERROR IN CREATE TRIGGER
Posted by: Mike Demaris
Date: June 07, 2011 11:02AM

have you tried to change the delimiter?

DELIMITER |

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 |

Options: Reply• Quote


Subject
Views
Written By
Posted
3650
April 21, 2011 06:02AM
Re: ERROR IN CREATE TRIGGER
1181
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.