two issues about triger

garyLiuxh's profile image garyLiuxh posted 4 weeks ago in General Permalink

1> not show trigger body on triger's page 2> can not create trigger on query page refer to 3.pnp

1 attachment(s):
  • 3
ansgar's profile image ansgar posted 4 weeks ago Permalink

"$$" 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;

garyLiuxh's profile image garyLiuxh posted 3 weeks ago Permalink

trigger body is empty, but show create triger is ok.

1 attachment(s):
  • 1
ansgar's profile image ansgar posted 3 weeks ago Permalink

Please post the result as text.

garyLiuxh's profile image garyLiuxh posted 3 weeks ago Permalink

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

garyLiuxh's profile image garyLiuxh posted 3 weeks ago Permalink

show.txt

1 attachment(s):

Please login to leave a reply, or register at first.