I have the following sorting problem in SQL.
SELECT time, orderValue FROM orders ORDER BY time
The problem is that time is expressed as a string in the following format:
May 2012 June 2012 ... June 2013
The ORDER BY clause, however, sorts the problem in alphabetical order (which is not strange since it is defined as a string). How to sort this in the correct order by year and month?
source share