Error 'String or binary data would be truncated' in Microsoft SQL Error 'String or binary data would be truncated' in Microsoft SQL sql sql

Error 'String or binary data would be truncated' in Microsoft SQL


Based on this link: http://www.sql-server-performance.com/2007/string-or-binary-data-truncated/

This error message appears when you try to insert a string with more characters than the column can maximal accommodate.


figure out the issue using following step.in your insert satement ,use 'LEN' function to find the length of the input columns.

suppose you are selecting data from a temp table for input. use the below query to find out maximum size of that column and compare with the actual size of the column in your original table (table you are going to insert data).

    SELECT MAX(LEN(column1))    FROM #yourInputData