I have a row that has both numbers ant strings. I whant to order it so that numbers will be ordered as numbers and all the strings would go to the end of table.
ORDER BY (
CASE
WHEN `{$table}`.`{$row}` LIKE '%[^0-9]%'
THEN CAST(`{$table}`.`{$row}` AS DECIMAL)
ELSE `{$table}`.`{$row}`
END
) ASC"
But instead the numbers are still sorted like strings.
Results:
0
410
680
72
Some other string
Some string
It should be:
0
72
410
680
Some other string
Some string