Aug 22, 2011 #1 junkmail Programmer Joined Jan 7, 2001 Messages 134 Location US Can someone tell me how to convert a varchar to a real number? everything I tried gives me the same error that you can't convert a varchar to real.
Can someone tell me how to convert a varchar to a real number? everything I tried gives me the same error that you can't convert a varchar to real.
Aug 29, 2011 #2 SQLBill MIS Joined May 29, 2001 Messages 7,777 Location US Maybe you have a value (or values) that are not numeric and can't be converted. Run this on your table, changing Tablename to the real table name and ColumnName to the column you are trying to convert. Code: SELECT ColumnName FROM Tablename WHERE ISNUMERIC(ColumnName) <> 1; That will return all values that are not numeric values. -SQLBill The following is part of my signature block and is only intended to be informational. Posting advice: FAQ481-4875 Upvote 0 Downvote
Maybe you have a value (or values) that are not numeric and can't be converted. Run this on your table, changing Tablename to the real table name and ColumnName to the column you are trying to convert. Code: SELECT ColumnName FROM Tablename WHERE ISNUMERIC(ColumnName) <> 1; That will return all values that are not numeric values. -SQLBill The following is part of my signature block and is only intended to be informational. Posting advice: FAQ481-4875