Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/03/2014, 17:31
Avatar de gnzsoloyo
gnzsoloyo
Moderador criollo
 
Fecha de Ingreso: noviembre-2007
Ubicación: Actualmente en Buenos Aires (el enemigo ancestral)
Mensajes: 23.324
Antigüedad: 16 años, 5 meses
Puntos: 2658
Respuesta: Uso de Old en un Trigger

Es un error en la definición del TRIGGER, lo estás creando para ejecutarse antes del UPDATE, y en ese caso el estado del registro no admite la existencia de OLD, porque aún está vigente.
Cita:
Within the trigger body, you can refer to columns in the subject table (the table associated with the trigger) by using the aliases OLD and NEW. OLD.col_name refers to a column of an existing row before it is updated or deleted. NEW.col_name refers to the column of a new row to be inserted or an existing row after it is updated.
PAra que te funcione el trigger debe ser BEFORE UPDATE, no AFTER.
__________________
¿A quién le enseñan sus aciertos?, si yo aprendo de mis errores constantemente...
"El problema es la interfase silla-teclado." (Gillermo Luque)