Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
update fs set fs.C_Parent=f.[reporting code]
from fsc f
join Tbl_FS_Mst fs on fs.C_Code=[fscode]
join Tbl_FS_Mst fst on fst.C_Code=fs.C_Parent
where fst.C_Name like 'vacant%'


If i execute this query Am getting error

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

can you tell what problem it could be..
Posted
Comments
Saral S Stalin 13-Mar-15 6:31am    
See the length of Tbl_FS_Mst.C_Parent and fsc.[reporting code]. C_Parent does not have sufficient length to take the value coming in from [reporting code]

1 solution

Without seeing your database I can tell you that you are trying to insert
a value into a database column which exceeds its length.

e.g. a column is defined as "Country varchar(5)"
and you try to insert "Germany" this error will occur
as the length of this value is greater than the database column allows.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900