I have a table called testTable with two columns, id that is auto incremented and someValue.
The data contained in the someValue column are: 12, 1.2, .4, 1d4, +, -, .
Data type for someValue is varchar(50).
Why are the following queries throwing
Error converting data type varchar to numeric.
select ID, someValue
from testTable
where ISNUMERIC(someValue + 'd0') = 1 and CAST(someValue as decimal(8,2)) > 0.1;
select tt.ID,tt.someValue
from (select ID, someValue
from testTable
where ISNUMERIC(someValue + 'd0') = 1) as tt
where CAST(tt.someValue as decimal(8,2)) > 0.1;