IF OBJECT_ID('dbo.vw_fco_periodos') IS NOT NULL
    DROP VIEW dbo.vw_fco_periodos
GO
CREATE VIEW dbo.vw_fco_periodos
AS
SELECT DISTINCT compania, periodo = Rtrim(anio) + '-' + Right('00' + RTrim(mes), 2), sit_periodo FROM fco_integrada_cab
GO
GRANT SELECT ON dbo.vw_fco_periodos TO PUBLIC
GO
