IF OBJECT_ID('dbo.sp_fco_baja_proc_reportes_ala') IS NOT NULL
    DROP PROCEDURE dbo.sp_fco_baja_proc_reportes_ala
GO
CREATE PROCEDURE dbo.sp_fco_baja_proc_reportes_ala
(  
    @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  
    DELETE fco_proc_reportes_ala   
    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_baja_proc_reportes_ala TO PUBLIC
GO
