Using floor in a trigger

0

Good day sorry I have this trigger to insert a getdate in the register whose code is FLOOR (m.codigoM) but I do not do the operation I'm thinking that the best is very ambiguous conditions that I'm putting.

 CREATE TRIGGER fechaactual
    ON casos
    FOR INSERT 
AS 
BEGIN


    UPDATE m
    SET m.fecha = GETDATE()
    FROM inserted i INNER JOIN datos m ON i.codigoM = FLOOR (m.codigoM)
    WHERE t.fecha = NULL
END
    
asked by Raul.Sen 07.07.2017 в 19:49
source

0 answers