有什么好方法可以调试“字符串或二进制数据会被截断?"吗? [英] Is there any good way to debug "String or binary data would be truncated?"

查看:19
本文介绍了有什么好方法可以调试“字符串或二进制数据会被截断?"吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

年份是 2010 年.

The year is 2010.

SQL Server 许可证并不便宜.

SQL Server licenses are not cheap.

然而,这个错误仍然没有指出value 产生了问题.见鬼,它甚至不能告诉你它是字符串"还是二进制"数据.

And yet, this error still does not indicate the row or the column or the value that produced the problem. Hell, it can't even tell you whether it was "string" or "binary" data.

我错过了什么吗?

推荐答案

解决这些问题的一种快速而肮脏的方法是将行选择到一个新的物理表中,如下所示:

A quick-and-dirty way of fixing these is to select the rows into a new physical table like so:

SELECT * INTO dbo.MyNewTable FROM <the rest of the offending query goes here>

...然后将此表的架构与之前插入的表的架构进行比较 - 并寻找较大的列.

...and then compare the schema of this table to the schema of the table into which the INSERT was previously going - and look for the larger column(s).

这篇关于有什么好方法可以调试“字符串或二进制数据会被截断?"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆