T-SQL 算术溢出:哪一列?

时间:2022-10-21
本文介绍了T-SQL 算术溢出:哪一列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

在 MS SQL Server 2005 中,当在 INSERT 过程中遇到将数字转换为数字类型的算术溢出错误"时,是否可以发现是哪个列的输入值导致了错误?

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?

推荐答案

据我所知,不,您无法获得错误消息以显示哪个列失败.但是,如果您知道要插入的内容,您应该能够找到错误所在.为什么不放表结构和插入查询.

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.

这篇关于T-SQL 算术溢出:哪一列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

上一条:按类型组合连续日期时间间隔 下一条:使用sql server查询远程数据库?

相关文章

最新文章