MySQL Forums
Forum List  »  Triggers

Re: Error wit trigger and delimiter
Posted by: Randi Logsdon
Date: May 12, 2006 04:15AM

unfortunately my trigger isn't so simple, i've combined the same action on many different columns to work around the duplicate trigger limitation, for example
DELIMITER //
CREATE TRIGGER upd_det BEFORE UPDATE ON owls.Detections FOR EACH ROW
BEGIN
IF NEW.StartWind > 12 THEN
SET NEW.StartWind = 12;
ELSEIF NEW.StartWind < 0 THEN
SET NEW.StartWind = 0;
END IF;
IF NEW.StartTemp < -40 THEN
SET NEW.StartTemp = -40;
ELSEIF NEW.StartTemp > 100 THEN
SET NEW.StartTemp = 100;
END IF;
IF ...
et al ...
END IF;
END//
any other workarounds?

Options: ReplyQuote


Subject
Views
Written By
Posted
3249
April 25, 2006 08:16AM
Re: Error wit trigger and delimiter
1863
May 12, 2006 04:15AM


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.