SELECT INITCAP (TO_CHAR (TO_DATE (&year || '-' || LPAD (ROWNUM, 2, '0'), 'yyyy-mm'), 'MON', 'NLS_DATE_LANGUAGE=AMERICAN')) prefix
, 'Month' TYPE
, TO_CHAR (&year) year
, TO_CHAR (TO_DATE (&year || '-' || LPAD (ROWNUM, 2, '0'), 'yyyy-mm'), 'q') quarter
, TO_CHAR (ROWNUM) num
, UPPER (TO_CHAR (TO_DATE (&year || '-' || LPAD (ROWNUM, 2, '0'), 'yyyy-mm'), 'dd-mon-yyyy')) date_from
, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || '-' || LPAD (ROWNUM, 2, '0'), 'yyyy-mm')), 'dd-mon-yyyy')) date_to
, INITCAP (TO_CHAR (TO_DATE (&year || '-' || LPAD (ROWNUM, 2, '0'), 'yyyy-mm'), 'mon-yy')) name
FROM DUAL
CONNECT BY LEVEL <= 12
UNION ALL
SELECT 'Adj' prefix
, 'Month' TYPE
, TO_CHAR (&year) year
, '4' quarter
, '13' num
, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || '-12', 'yyyy-mm')), 'dd-mon-yyyy')) date_from
, UPPER (TO_CHAR (LAST_DAY (TO_DATE (&year || '-12', 'yyyy-mm')), 'dd-mon-yyyy')) date_to
, 'Adj-' || TO_CHAR (TO_DATE (&year, 'yyyy'), 'yy') name
FROM DUAL;