Hi. I have a varchar column where I need to find every numeric value under 199. I tried
However, I get the message:
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'OI' to data type int.
Is there a way I can have my query only consider the numeric values? I thought the ISNUMERIC would do it, but the 'convert(int' doesn't work.
Thanks!
Brian
Code:
select * from mytable
where ISNUMERIC(col001 + 'e0')=1
and convert(int, col001) < 199
However, I get the message:
Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'OI' to data type int.
Is there a way I can have my query only consider the numeric values? I thought the ISNUMERIC would do it, but the 'convert(int' doesn't work.
Thanks!
Brian