src: | SELECT 'M'::text || CASE WHEN (p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric) <= 12::numeric THEN p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric ELSE p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric - 88::numeric END::text AS code, p_calendrier_mois.texte_court AS texte, p_calendrier_mois.mois, p_calendrier_mois_1.mois AS premier_mois FROM base.p_calendrier_mois, base.p_calendrier_mois p_calendrier_mois_1 WHERE p_calendrier_mois.mois >= p_calendrier_mois_1.mois AND (p_calendrier_mois.mois - p_calendrier_mois_1.mois) <= 99::numeric UNION SELECT 'N'::text || CASE WHEN (p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric) <= 12::numeric THEN p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric ELSE p_calendrier_mois.mois - p_calendrier_mois_1.mois + 1::numeric - 88::numeric END::text AS code, to_char(p_calendrier_mois.mois, 'FM999999'::text) AS texte, p_calendrier_mois.mois, p_calendrier_mois_1.mois AS premier_mois FROM base.p_calendrier_mois, base.p_calendrier_mois p_calendrier_mois_1 WHERE p_calendrier_mois.mois >= p_calendrier_mois_1.mois AND (p_calendrier_mois.mois - p_calendrier_mois_1.mois) <= 99::numeric ORDER BY 4, 3;