Thursday, May 31, 2012

Month Number to Month Abbreviation in Oracle SQL

Today I needed to convert a number (1-12) to a month abbreviation in Oracle SQL.  After some searching I realized I couldn't find an example anywhere.  So here is my method:

select
to_char(to_date([month_num], 'MM'),'MON') as month
from month