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