IF OBJECT_ID('dbo.sp_fco_upd_proc_reportes_ala') IS NOT NULL
    DROP PROCEDURE dbo.sp_fco_upd_proc_reportes_ala
GO
CREATE PROCEDURE dbo.sp_fco_upd_proc_reportes_ala
(
    @pch_procesar char(1),
    @pch_compania char(4),    
    @pch_codigo char(10),    
    @psi_anio smallint,    
    @pti_mes tinyint,    
    @pch_epf_fpo char(10),    
    @pch_sucursal char(10)
)
AS
BEGIN
    UPDATE fco_proc_reportes_ala
    SET procesar = @pch_procesar
    WHERE   
        compania = @pch_compania AND  
        codigo = @pch_codigo AND  
        anio = @psi_anio AND  
        mes = @pti_mes AND  
        EPS_FPO = @pch_epf_fpo AND  
        ISNULL(sucursal,'') = ISNULL(@pch_sucursal, '')  

END
GO
GRANT EXECUTE ON dbo.sp_fco_upd_proc_reportes_ala TO PUBLIC
GO
