Sql – String or binary data would be truncated error

sql server

Using SQL Server 2005

I have two table which have the same datatype and datasize, same data's

When i execute my query, I got the result in one table, when i execute the another table i got this error as string or binary data would be truncated error, i checked the datatype size also. Before it was running, am getting this error from two days onwards.

I checked the datatype size also, i modified my datatype upto 256, still it showing error.

How to solve this issue.

Best Answer

You have to check everything is the same...

  • Correct DB?
  • Correct schema? (eg foo.MyTable and dbo.MyTable)
  • Correct column order?
  • Trigger?
  • Concatenation or some processing?
  • Same data being inserted?

Edit: What was it of my list, out of interest please?