miércoles, 22 de febrero de 2012

actualizacion de campo en segunda tabla con trigger

alter TRIGGER updateAprobadas
ON pantallas
AFTER insert
AS
BEGIN
SET NOCOUNT ON;
update aprobadas set id_pantalla = INSERTED.id_pantalla from inserted
where aprobadas.contrato = INSERTED.contrato
and aprobadas.id_mesayo = INSERTED.id_mesayo
and aprobadas.dia=INSERTED.dia
End
GO

No hay comentarios: