I have a table with unit numbers like 902-A, 902-B, etc. The user has an option of sorting the units in ascending order or by the unit's name (like Areneas, Barios, etc). There are no issues if the user opts unit's name, but when the user chooses to sort by unit number it returns:
902-C
902-B
902-A
Obviously I want 902-A, 902-B, 902-C
The SQL Order By is
Order By u.unit_number +0 ASC
Suggestions?
thanks,
Robkir