Home Forums SQL Server 2008 T-SQL (SS2K8) How to order date which month is in abbreviation format RE: How to order date which month is in abbreviation format

  • create a datetime dimension and join to it for the sort

    Create Table dimDateTime (

    DateOrder int,

    MonthDescr varchar(10)

    )

    insert into dimDateTime values

    (1,'JAN 2012'),

    (2,'FEB 2012'), etc

    select stuff

    from MyTable

    join dimDateTime

    on dateColumn = MonthDescr

    order by DateOrder