I have a column Month in my table. The month name and date are stored in this month column like
Month
01-JAN-12
02-FEB-12
Totally agree regarding writing a case when Oracle offers built-in functionality:
SELECT EXTRACT(MONTH FROM DATE '2012-03-15') FROM DUAL;
SELECT EXTRACT(MONTH FROM TO_DATE('01-JAN-12', 'DD-MON-RR')) month_to_number FROM DUAL;
select to_number(to_char(to_date('01-JAN-12','dd-mon-yy'),'mm')) month_to_number from dual;
select to_number(to_char(trunc(sysdate), 'mm')) month_to_number from dual;