-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateOrderEvent.sql
More file actions
19 lines (17 loc) · 1.18 KB
/
createOrderEvent.sql
File metadata and controls
19 lines (17 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
delimiter |
CREATE EVENT createNewOrder
ON SCHEDULE
EVERY 1 week starts '2020-02-12 23:55:00' ON COMPLETION NOT PRESERVE ENABLE
DO
BEGIN
UPDATE transaction SET transaction.transactionStatus = "SUBMITTED" WHERE transaction.transactionStatus = "NEW" AND transaction.transactiontype = "ORDER";
INSERT INTO transaction VALUES(NULL, "ORDER", "STJN", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "MCTN", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "DIEP", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "FRED", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "OROM", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "MIRA", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
INSERT INTO transaction VALUES(NULL, "ORDER", "SUSX", now(), NULL, "NEW", NULL, CONCAT("SUBMITTED: ", now()));
CALL addLowItems;
END |
delimiter ;