Lets say that I have a table which contains a column for invoice number, the data type is VARCHAR with mixed string/int values like:
invoice_number *********
This should work also
SELECT invoice_number FROM invoice_header ORDER BY LENGTH( invoice_number) DESC,invoice_number DESC LIMIT 0,1