I'm trying to get a list of some products' model & all models are alphanumeric.
I tried
ORDER BY CAST(field_name AS UNSIGNED)
and
ORDER BY field_name + 0
and
ORDER BY LENGTH(field_name)
and some other ways.
They works for most of them but there are some values that doesn't match the order.
The result I get is like
EAG-75
EAG-110
...
ESCG-500
ESCG-600
...
EYG-40
EYG-55
...
EMG-440
EMG-20
EMG-27
...
EAG-100
...
I don't understand what is causing this.
Please help.
Thanks in advance