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
and so on.
How do I convert the DATE into month number such as
Month
1
2
etc.
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
and so on.
How do I convert the DATE into month number such as
Month
1
2
etc.
You can use the "DatePart" function too :
http://docs.oracle.com/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/dml/funcs/datepart.htm
datepart function do this easily
Extract works perfectly for this
gives you
Totally agree regarding writing a case when Oracle offers built-in functionality: