views:

55

answers:

1

An insert statement with a large number of values returns 'Error converting data type varchar to numeric.'

How can I find which value actually triggers the error?

MS SQL Server 2008 is used.

+2  A: 

you can use the function ISNUMERIC()

select * from table
where isnumeric(column) = 0

or

declare @v varchar(100)
select @v = 'abd'

select ISNUMERIC(@v)

Also take a look at this IsNumeric, IsInt, IsNumber post to help you further with these kind of problems

SQLMenace
Thanks, turns out empty quotes were being passed in place of nulls.
Stan

related questions