CREATE TRIGGER ITEMFILEST_U ON [dbo].[ITEMFILEST] 
FOR UPDATE
AS
DECLARE @QRESERV FLOAT
IF UPDATE(QTDERESERV)
BEGIN
SELECT @QRESERV = QTDERESERV FROM INSERTED
INSERT INTO LOGITEMFIL (FILIAL, CODPRO, QUANTRESERV,  QUANTPEDIDO, QUANTEST, DATAHORA, DESCRICAO) 
SELECT  ins.filial, ins.codpro, ins.qtdereserv, del.qtdereserv, ins.quant, getdate(), @@SPID  from inserted  ins, deleted del
END 



