You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE after_campaign_update` AFTER UPDATE ON `campaigns` FOR EACH ROW BEGIN UPDATE `sc-campaigns`.campaigns SET `client_id` = NEW.client_id,`guid` = NEW.guid,`name` = NEW.name,`description` = NEW.description,`active` = NEW.active,`settings` = NEW.settings WHERE id = OLD.id;END
Current behavior
HeidiSQL return this
CREATE DEFINER=`sc_root`@`%` TRIGGER `after_campaign_update` AFTER UPDATE ON `campaigns` FOR EACH ROW BEGIN
UPDATE `sc-campaigns`.campaigns SET
`client_id` = NEW.client_id,
`guid` = NEW.guid,
`name` = NEW.name,
`description` = NEW.description,
`active` = NEW.active,
`settings` = NEW.settings
WHERE id = OLD.id;
/* SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 9 */
/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 0 of 2 queries: 0,000 sec. */
Line 9 is the line where you find WHERE id = OLD.id;
Expected behavior
I would expect to create the trigger, as it did with other SQL UI (tablePlus on Mac)
Possible solution
Out of my scope
Environment
HeidiSQL version: 10.1.0.5464 (64 Bit)
Database system and version: 10.1.34-MariaDB
Operating system: Windows v10.0
The text was updated successfully, but these errors were encountered:
If you run such compound statements, you need to set the delimiter to something else than semicolon, otherwise HeidiSQL splits your statement at each semicolon.
You can tell HeidiSQL to use e.g. \\ as delimiter, by pressing the button with the semicolon on the maintoolbar. Or use the DELIMITER client command.
Steps to reproduce this issue
tries to create an after-update trigger
Current behavior
HeidiSQL return this
Line 9 is the line where you find
WHERE id = OLD.id;
Expected behavior
I would expect to create the trigger, as it did with other SQL UI (tablePlus on Mac)
Possible solution
Out of my scope
Environment
The text was updated successfully, but these errors were encountered: