Hi,
I have a with the following data:
Col001:
1
5
2E
6
9
I am working on a larger query, but in it's simplest terms I am trying
I get an error: Conversion failed when converting the varchar value '2D2' to data type int.
I thought if I included the 'where isnumeric(col001)=1' at the end it would disregard the 2D2, but that doesn't seem to be the case. Is there another way I can select convert (int, col001) in a field that has numeric and alphanumeric values?
Thanks!
I have a with the following data:
Col001:
1
5
2E
6
9
I am working on a larger query, but in it's simplest terms I am trying
Code:
select convert(int, col001)
from mytable
where isnumeric(col001)=1
I get an error: Conversion failed when converting the varchar value '2D2' to data type int.
I thought if I included the 'where isnumeric(col001)=1' at the end it would disregard the 2D2, but that doesn't seem to be the case. Is there another way I can select convert (int, col001) in a field that has numeric and alphanumeric values?
Thanks!