T-SQL Arithmetic overflow: which column?

2020-06-23 09:37发布

问题:

In MS SQL Server 2005, when encountering an "Arithmetic overflow error converting numeric to data type numeric" during an INSERT, is it possible to discover which column's input value caused the error?

There seems to be a number of similar conversion errors that don't report which column provoked the trouble. This makes fixing mistakes rather difficult in huge queries. Is there some other way to deal with this?

回答1:

As far as i know, No, you can't get the error message to show you in which column is failing. But, if you know what you are inserting you should be able to find where the error is. Why don't you put the table structure and the insert query.