I am converting a list of user entered varchar values that should be numeric.
I want to convert the varchar to numeric and I will then insert into a numeric field.
Problem occurs if user enters a screwy value like 185 185.
The SQL conversion of select statement will error
"Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.
IF there are 1000 records it is hard to find the offending record.
Is there a Select stmt I can run to find the offending values and correct them prior to running the conversion?
BTW, I have no control over the user input as that is a vendor system and database.
Thank you
I want to convert the varchar to numeric and I will then insert into a numeric field.
Problem occurs if user enters a screwy value like 185 185.
The SQL conversion of select statement will error
"Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to numeric.
IF there are 1000 records it is hard to find the offending record.
Is there a Select stmt I can run to find the offending values and correct them prior to running the conversion?
BTW, I have no control over the user input as that is a vendor system and database.
Thank you