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

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)