Error Converting Data Type Varchar To Numeric When Updating Field

Hey guys, I imported pricing into my table and some were a NULL (empty) value and when I try to update them to '0.0000' I get the following 'Error converting data type varchar to numeric.'

Select * from MyTable
Where Price = ''
also returns the error 'Error converting data type varchar to numeric.'

Is there any way I can update the db, or will I need to change my master import file not to contain null values?


Who is Participating?
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
update urTable
SET NumericColumn = 0
WHERE NumericCOlumn is null or ISNUMERIC(NumericColumn) =  0
Aneesh RetnakaranDatabase AdministratorCommented:
Select * from MyTable
Where Price is null


Select * from MyTable
Where ISNUMERIC(Price) = 0
GiracAuthor Commented:
Once I seen the 'Where ISNUMERIC(Price) = 0 ' I was able to update.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.