MySQL Forums
Forum List  »  Triggers

Re: syntax
Posted by: Devart Team
Date: August 31, 2012 06:08AM

Try this code -

CREATE TRIGGER UPD_INTEGRAL_NO BEFORE INSERT ON mt4.mt4_trades
FOR EACH ROW
BEGIN
  IF INSTR(BINARY NEW.comment, 'O:') > 0 THEN
    SET NEW.INTEGRAL_OPEN = MID(NEW.comment, INSTR(BINARY NEW.comment,'O:') + 2, 8);
  END IF;
END

In this case the delimiters should be used, e.g. -

DELIMITER $$

CREATE TRIGGER
...
BEGIN
...
END$$

DELIMITER ;

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/

Options: ReplyQuote


Subject
Views
Written By
Posted
2095
August 30, 2012 04:09AM
Re: syntax
1464
August 31, 2012 06:08AM


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.