Topic: How to get max integer value in a text column?
Hi there,
I am struggling in getting the max value of an integer in a Text column.
The TelNr column has to contain text and numbers but I would like to retrieve a very specific value from this column.
As shown in the attached file, the numbers are not sorted in the right order and thus when I request the max value, I do not get the right result.
The point is that in my application, I have a query to check the next available telephone number depending on which number is already in the database BUT I want to limit the availability on the last 4 digits and it does not work due to the text type of this column.
Any suggestion apart from a re-design of the database and the application?