T-SQL Arithmetic overflow: which column?(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 算术溢出:哪一列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:T-SQL 算术溢出:哪一列?


基础教程推荐
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01