I have problem while converting varchar type to Int type in Informix. Actually I don't know if the value is really varchar or not which I want to convert to INT. It's a sandbox system.
As Example: I am trying to run this kind of
Select telnumber from numbers n
where Cast(n.telnumber AS INT) between 1234 and 9999
I got this error: "Character to numeric conversion error"
If I run this query like this:
Select telnumber from numbers n where n.telnumber between '1234' and '9999'
it brings a resultset but not in the range that I defined.
130987
130710
130723
How can I convert telnumber to a numeric value and use it in "between" 1234 and 9999 range