Aug 22, 2011 #1 junkmail Programmer Jan 7, 2001 134 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 May 29, 2001 7,777 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