I'm trying to create the following trigger:
DELIMITER //
CREATE TRIGGER 'smdraux_after_insert' AFTER INSERT ON 'smdraux' FOR EACH ROW BEGIN
IF(LENGTH(NEW.llamante) = (4) AND NEW.nombreinterlocutor1 NOT LIKE 'VM Channel%'
AND NEW.nombreinterlocutor1 NOT LIKE 'U10%' AND NEW.nombreinterlocutor1 NOT LIKE 'Nuevo'
AND NEW.nombreinterlocutor1 NOT LIKE 'Elvira' AND NEW.nombreinterlocutor1 NOT LIKE 'Contact Center'
AND NEW.nombreinterlocutor1 NOT IN (SELECT nombreagente FROM agente)) THEN
INSERT INTO agente(nombreagente, fechaderegistro)
VALUES(NEW.nombreinterlocutor1, NOW());
END //
But I'm getting the error:
"# 1064 - Something is wrong in its syntax near 'END' on the line 10 "
Which is very ambiguous for me, which is the first time I work with triggers. I tried to put the expression "// DELIMITER;" after the 'END' but it sends me the same error.