I was having some trouble when trying to write an SQLstatement which sorted by time column which is in varchar format in ascending order. Here is my SQL statement:
SELECT mrtpopTime, mrtpopAmt
FROM tm_mrtpop
WHERE mrtpopName = ''
ORDER BY mrtpopTime
And I am getting these results:
As you can see from the picture, it was sorted by character by character. Is there anyway to sort it like:
0:00, 1:00, 2:00, 3:00 all the way to 23:00
Any ideas? Thanks in advance.