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, +, -, .
I want to select only the numeric values. But when I use the following query:
SELECT someValue, ISNUMERIC(someValue)
FROM testTable;
all the values are true. And for the query:
SELECT * FROM testTable
WHERE ISNUMERIC(someValue) = 1;
all the values are being returned.
I just want 12, 1.2 and .4 .
How can I achieve this?
UPDATE:
The data type for the column someValue is varchar(50).
someValue'%[^0-9.]%to allow the decimal values