I have the following data:
[sequences]
/a1
/a2
/a3
...
/a10
The query SELECT * FROM sequences WHERE nbr <= '/a10' should return the list above, instead it returns:
[results]
/a1
/a10
How do I make it return all the rows in the above list?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It works as it should. To compare the numeric value, you’ll have to convert these to numbers somehow. A good start would be to use
substr(yourfieldname, 3) to cut of the/a. Then you can useconvert` to typecast it to int, so your final query will look something like:Mind that the exact functions and rules for converting strings to ints may very per dbms. This illustrates the general idea, though.