Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Query Error

Author  Topic 

zlloyd1
Starting Member

1 Post

Posted - 2012-09-02 : 06:18:55
I am getting this when I execute a query in SQL Server 2008:
Msg 8152, Level 16, State 4, Line 2
String or binary data would be truncated.
The statement has been terminated.
and I cannot understand what is happening.... Can someone please tell me why this is occurring??

Tracer Agent

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2012-09-02 : 10:58:01
You are trying to insert or update a column with more data than the column can take. For example, you have a varchar(10) column and are trying to insert 11 characters into that column.

To help you further - we would need to see the actual code you are running.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2012-09-02 : 12:11:52
Could you also include the DDL of the table ?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -