Ver Mensaje Individual
  #12 (permalink)  
Antiguo 10/03/2015, 16:10
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Uso Del Trigger

prueba con:


Código MySQL:
Ver original
  1. CREATE TRIGGER hacer_reporte AFTER INSERT
  2. ON t_extintor_foto
  3.   INSERT INTO t_extintor_reporte(empresa, folio, fecha, observaciones)
  4.   VALUES (new.empresa, new.folio, new.fecha, new.comentario);
  5.   UPDATE t_extintor_reporte, t_extintor
  6.   SET t_extintor_reporte.ubicacion=t_extintor.extintor_desc
  7.   WHERE t_extintor_reporte.folio=t_extintor.folio;
  8. END$$
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me