Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data conversion

Status
Not open for further replies.

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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top