• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 617
  • 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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