I have a SQL statement that keeps giving me this error:
Error converting data type nvarchar to numeric.
My select statement is the following:
SELECT
cast(Table.StringValue as numeric(4))
FROM
Table
WHERE
cast(Table.StringValue as numeric(4)) < 60
The Table.StringValue has some null values as well as text like the word 'green' or 'yellow'. If I remove the where statement the SQL statement works. Is there something I need to do special to be able to use the cast statement within a where clause?