Saludos
tengo el siguiente trigger. basicamente lo que hace es llevar una auditoria
de actualizaciones de dos campos de la tabla de ot en auditoria de ot.
CREATE TRIGGER [t_audi] ON [ot]
FOR UPDATE
AS
IF UPDATE(linea) or UPDATE(rlinea)
INSERT INTO AUDITORIA_OT(FECHA_OPERACION,
custom,fecha_cliente,codigo_manual,linea,usuario,maquina)
select getdate(),
t_custom,getdate(),t_codigo_manual,rlinea,SYSTEM_USER,host_name() from ot
where t_custom = 23 and t_date = '2003-01-20'
la pregunta es, como le paso los parametros al where de (t_custom) y
(t_date.) con los datos del registro modificado, para obtener los datos
que
voy a grabar en auditoria_ot?
gracias por sus comentarios.
Leer las respuestas