0

The execution gives a error (Error Code: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 1) I don't know what is wrong with it so I was hoping a new set of eyes could help. The execution of the procedurees without the event works fine so its something to do with the event.

DELIMITER //
CREATE EVENT Daily_procedures
  ON SCHEDULE
    EVERY 1 DAY
    STARTS (TIMESTAMP(CURRENT_DATE)  + INTERVAL 1 DAY)
  DO 
    CALL sp_MessageSender();
    CALL sp_DataMapper();
    CALL sp_PaymentAutomation();
END//
DELIMITER ;
Tristan
  • 17
  • 6

1 Answers1

2

According to docs:

As with stored routines, you can use compound-statement syntax in the DO clause by using the BEGIN and END keywords

So you should wrap your event body into BEGIN/END like this:

DO
  BEGIN 
    CALL sp_MessageSender();
    CALL sp_DataMapper();
    CALL sp_PaymentAutomation();
  END//
rkosegi
  • 14,165
  • 5
  • 50
  • 83