Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String or binary data would be truncated on insert problem

Status
Not open for further replies.

hedgracer

Programmer
Mar 21, 2001
186
US
I have never, ever ran into this before. I am inserting data from one table to another and the insert is only one field to another field. Both fields are varchar(50). The field being transferred from populated just fine using an Access 2007 text import function with no errors. When I try to do this:

INSERT INTO TT_Username_CashSheet_GL_Assignments (
Username
) SELECT MoreInfo FROM TT_Import
GROUP BY MoreInfo

I get this:

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

This has me completely puzzled. I have googled this and most (if not all) postings talk about the some entry in the field being too long. Since both fields are exactly the same size (varchar(50)) this does not seem possible. Can someone give me an idea on this one? Any help is appreciated. Thanks.

Dave
 
By the way, I ran the following:

Select max (len(moreinfo)) from dbo.TT_Import

the result from the above statement was 20.

Dave
 
Maybe there is an insert trigger on the table and the error is actually generated there.

Run this:

sp_helpTrigger 'TT_Username_CashSheet_GL_Assignments'

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top