468,134 Members | 1,186 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

Converting from String to Numeric Problem

I have a SQL statement that keeps giving me this error:

Error converting data type nvarchar to numeric.

My select statement is the following:

cast(Table.StringValue as numeric(4))
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?
Sep 20 '06 #1
0 2194

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Frederik Vanderhaeghe | last post: by
11 posts views Thread by Jean-François Michaud | last post: by
15 posts views Thread by allthecoolkidshaveone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.