1> not show trigger body on triger's page 2> can not create trigger on query page refer to 3.pnp
two issues about triger
"$$" belongs to the quotes, used mainly in PostgreSQL mode. You cannot use any of these as a delimiter. HeidiSQL currently does not tell you so but it's not working. Use a different delimiter, like //
The quotes which cannot be used as delimiters are: " ' ` $$
For checking why your trigger body is empty, please post the result of SHOW CREATE TRIGGER plc_tx_cmbAndKeep_R_U;
SHOW CREATE TRIGGER plc_tx_cmbAndKeep_R_U
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
plc_tx_cmbAndKeep_R_U STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION CREATE DEFINER=root@localhost TRIGGER plc_tx_cmbAndKeep_R_U utf8 utf8_general_ci utf8mb4_general_ci 2025-12-21 18:22:45.52
BEFORE UPDATE ON PLC_CMB_OUT
FOR EACH ROW
BEGIN
IF OLD.Status <> 'Y' AND NEW.Status = 'Y' THEN
SET NEW.dateOpen = appTime();
ELSEIF OLD.Status = 'Y' AND NEW.Status = 'R' THEN
SET NEW.dateClose = appTime();
ELSEIF (OLD.Status <> 'A' AND NEW.Status = 'A') OR
(OLD.Status <> 'F' AND NEW.Status = 'F') THEN
SET NEW.dateFinish = appTime();
END IF;
END
Please login to leave a reply, or register at first.

