[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

String or binary data would be truncated.

String or binary data would be truncated.
                  The statement has been terminated.

Is there an easy way to know for which column the problem is coming,in case of insert, and for which row value (or string)"

I have 181 Columns having varchar type with more then 18000 Rows..

Now I added 50 more columns to this table and create a new table
I am running query
insert into table2( < 181 column names> )
select <181 Column Names > from Table1

I am getting this error How can I get the Specific Column Name for which column the problem is coming
  • 2
1 Solution
Raja Jegan RSQL Server DBA & ArchitectCommented:
You can check whether some column data types are changed by looking the DDL's of both the tables and identifying it or from the Information Schemas.


Other than that there are no other easy ways I guess.
Anthony PerkinsCommented:
>>I am getting this error How can I get the Specific Column Name for which column the problem is coming<<
If this is occurring in DTS you can check the box "Turn on just-in-time debugging" to stop at the exact error.  Alternatively, you can tempoararly add a file name to the Exception file so that it can report any errors and you can inspect the file.
VivekrkKhareAuthor Commented:
I check it with Turn on just-in-time debugging but not get success, please let e know how to add Exception file while ruan a query?
Anthony PerkinsCommented:
1. In the Transformation Data Task click on the Options tab.
2. Enter the full path name to the file in the "Exception file name"

From BOL:
Exception file properties area

Specify the path and name of the file where exception records will be written. If the file does not exist at package run time, the file will be created. The file does not have a default extension assigned to it.

Display the Select File dialog box, where you can search the local computer or mapped drives for an existing exception file. If an existing exception file is used, the status and error information for the package will be appended.

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now