什么是字符串或二进制数据会被截断? [英] What is string or binary data would be truncated?

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

问题描述

Iam执行以下查询,但它给出错误判断..



update Tbl_Doc_Stock_Chem_Add_Mst set C_Subarea_Code = i.newcode

,C_Area_Code = sub.C_Area_Code

来自Tbl_Doc_Stock_Chem_Add_Mst sd

加入indsub i on sd.C_Subarea_Code = i.oldcode

加入Tbl_Sub_Area_Mst sub on sub.C_Code = sd .C_Subarea_Code



请尽快告诉我..









消息8152,等级16,状态14,行1

字符串或二进制数据将被截断。

语句已被终止。

Iam executing below query but it is giving error statment..

update Tbl_Doc_Stock_Chem_Add_Mst set C_Subarea_Code=i.newcode
,C_Area_Code=sub.C_Area_Code
from Tbl_Doc_Stock_Chem_Add_Mst sd
join indsub i on sd.C_Subarea_Code=i.oldcode
join Tbl_Sub_Area_Mst sub on sub.C_Code=sd.C_Subarea_Code

please tell me as soon as possible..




Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.
The statement has been terminated.

推荐答案

错误消息非常明确:字符串或二进制数据将被截断



我猜你是从应用程序插入(或更新)SQL中的一行。发生的事情是您尝试插入的数据不适合该字段:如果数据是文本,那么请查看列定义:您有一个定义的长度(例如)10或50个字符,但您的数据是尝试插入比这更长。

要么增加列的大小,要么减小要发送的数据的大小。
The error message is pretty explicit: "String or binary data would be truncated"

I'm guessing that you are inserting (or updating) a row in SQL from your application. What is happening is that the data you are trying to insert does not fit in the field: if the data is text, then look at the column definition: you have a defined length of (say) 10 or 50 characters but the data you are trying to insert is longer than that.
Either increase the size of the column, or reduce the size of the data you are sending.


检查数据库。 。

实际上这个问题可能发生在数据库中

例如



colum_name data_type

---------- ---------

id int

name varchar(8)

地址varchar(50)



你输入的值如1,anand rajan,chennai

id lenght 1

name lenght 10

地址长度6



这里名称长度超出因为名称数据类型长度为8



i希望它可以帮到你..



谢谢
check your database..
actually this problem may occurring from database
for example

colum_name data_type
---------- ---------
id int
name varchar(8)
address varchar(50)

you insert the value like 1,anand rajan,chennai
id lenght 1
name lenght 10
address length 6

here name length is exceeding because of name datatype length is 8

i hope its may be helps you..

thanks


这个m你的领域不足以容纳你的数据。

检查表格,我想你会发现一个或多个字段的长度不足以容纳你正在尝试的数据插入。



所以你可能想考虑改变它的大小。 :)



-KR
This means that your field is not big enough to hold your data.
Check the table, I think you'll find that the length of one or more fields is not big enough to hold the data you are trying to insert.

So you might want to consider the changing the size of it. :)

-KR


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

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