I have a table in MYSQL with a column called league.
When I try to sort the values using this query I cant get it to sort correctly.
SELECT DISTINCT (
t.league
)
FROM teams t
GROUP BY t.league
ORDER BY t.league ASC
However with this I get:
11a12
13
14
15
16a17
5a7
8a10
it looks like it sorts all of them correctly except the last two
Any ideas?
thanks
Yes, the column must be of a string type and
5comes AFTER11. You might consider changing those fields (which seem to be multivaluated) into 2 separate numeric fields (or even 3 if thatavalue makes any difference)