How do I sort a column (VARCHAR) like this:
[CSGO] Bot #1 [CSGO] Bot #2 [CSGO] Bot #3 ... [CSGO] Bot #10 My Query results in:
[CSGO] Bot #2 [CSGO] Bot #23 [CSGO] Bot #5 [CSGO] Bot #6 Query:
SELECT bot_id, name, username FROM bots ORDER BY ABS(REPLACE(name, '[CSGO] #', '')) ASC Without the ABS() and REPLACE(), gives basically the same result.
'Bot'. It looks the theREPLACEfunction returns an unmodified value ofname.