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