This content has been marked as final. Show 5 replies
I am trying to order my months table in chronological order instead of alphabetical. The script I have is the following:
OPT9.CODEDESC as Division,
to_char(VMO_OPPORTUNITY.created,'MON' ) as Month_created,
to_char(VMO_OPPORTUNITY.created,'YYYY' ) as YEAR_created
left join IFSAPP.VMO_BASE_CODEDESC opt9 on VMO_OPPORTUNITY.OKM_DIVISION=opt9.IDCOD
left join IFSAPP.VMO_BASE_CODEDESC type1 on VMO_OPPORTUNITY.KindofOpp =type1.IDCOD
where idcodprs ='prs.001'
and (OPT9.idlng = 'en' or OPT9.idlng is null)
and (type1.idlng = 'en' or type1.idlng is null)
to_char(VMO_OPPORTUNITY.created,'MON' ) ,
I know I need to load the months as JAN = 1 etc, but can't remember the SQL for it. Can someone jog my memory please?