MySQL - Error 1235 - multiple triggers

 
Vista:
sin imagen de perfil

Error 1235 - multiple triggers

Publicado por Charlie (1 intervención) el 28/05/2020 16:27:09
Saludos, estoy importando una base de datos pero no la hice yo ni tampoco soy el administrador de la misma, a la hora de importar me da un error en las lineas que adjunto a continuación:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER invoice_before_update
	BEFORE UPDATE
	ON `invoices` FOR EACH ROW
	BEGIN
  DECLARE new_gl_code varchar(50);
  -- ERROR checking around if asset_id = 0
  IF (NEW.invoice_status =17)
  THEN
    SET new_gl_code = (SELECT g.gl_code
							FROM general_ledgers AS g
							INNER JOIN users AS u
							ON g.user_id = u.user_id
							INNER JOIN locations l ON l.location_id = NEW.location_id
							WHERE u.user_id = NEW.customer_id AND g.category_type_id = NEW.category_type_id AND g.asset_type_id = NEW.asset_type_id AND
				(CASE
					WHEN u.location_id = 0 THEN g.gl_code IS NOT NULL
					WHEN u.location_id = 1 THEN l.location_type_id = g.location_type_id
					WHEN u.location_id = 2 THEN g.location_id = NEW.location_id
				END));
 
      -- UPDATE gl_code after we've found correct info
      SET NEW.gl_code = new_gl_code;
  END IF;
END */;;
DELIMITER ;

Alguna idea de que puede estar sucediendo?

Error:
MySQL ha dicho: #1235 - Esta versión de MySQLno soporta todavia 'multiple triggers with the same action time and event for one table'
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder