Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get the months as name of the month instead of the number of the month ?

Christian PitetNov 30 2022

Hi,
I have a table from which I extract the months with a group by statement :

SELECT
EXTRACT(MONTH FROM "DATE_FIN_PÉRIODE") AS month,
SUM (CONSOMMATION)
from FL_SIGEIF
group by EXTRACT(MONTH FROM "DATE_FIN_PÉRIODE")
order by 1;

It gives me something like that :
Capture.PNGThe months are in number format. How to get their names instead ? For example 1 would be replaced by January, etc...
Best regards.

This post has been answered by mathguy on Nov 30 2022
Jump to Answer
Comments
Post Details
Added on Nov 30 2022
9 comments
7,815 views