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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CONVERT keyword

Status
Not open for further replies.

Timcwilcox

Programmer
Jun 28, 2002
12
GB
I have a SQL table with a VARCHAR element that contains a number, i want to read this with a convert(numeric) statement, but it stops the SQL script when it reaches a value that is not numeric. How can i get the SQL script to wither skip past the data item, or use zero?
 
You could use the ISNUMERIC function to test whether the varchar field contains something that SQL recognises as a number before trying the CONVERT.
 
Thanks, this was the correct solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top