DELETE FROM TESISSEG.dbo.AS_INCIDENCIAS_USUARIOS_AVISO
WHERE INC_ID IN (SELECT INC_ID FROM TESISSEG.dbo.AS_INCIDENCIAS
                 WHERE EmpID = 500 AND Fusion_USR_Id_FC = 4827 AND INC_Situacion = 1 AND GesAviFH < = '2025-14-04 23:59:59')


UPDATE A
SET A.Aviso_Gestor_Comercial = 0,
    A.Aviso_Gestor_Administrativo = 0,
    A.Aviso_Tramitador_Siniestro = 0,
    A.Aviso_Todos = 0,
    A.Aviso_Colaborador = 0,
    A.Aviso_Colaboradores_Todos = 0,
    A.GesAviFH = NULL
    FROM TESISSEG.dbo.AS_INCIDENCIAS
WHERE EmpID = 500 AND Fusion_USR_Id_FC = 4827 AND INC_Situacion = 1 AND GesAviFH < = '2025-14-04 23:59:59'