입력값이 날짜가 아니군요ㅋㅋ
대강 알겠습니다.
select b.year||b.month months from ( select frdt, to_char(last_day(add_months(to_date(frdt,'yyyymmdd'),2)),'yyyymmdd') todt from (select substr(:indt,1,4) ||decode( substr(:indt,5,2),'01','01','02','04','03','07','04','10')||'01' frdt from dual) ) a, md_calendar b where b.date between a.frdt and a.todt