Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How do I identify the column(s) responsible for “String or binary data would be truncated.”

Asked by Chris Evans Jul 12, 2021 2.5K views 1 answer
Share

About this question

I am generating some queries automagically with code I wrote to SELECT from a remote Pg database, and insert into a local SQL Server database. However, one of them is generating this error: [Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated. (SQL-22001) [state was 22001 now 01000] [Microsoft][ODBC SQL Server Driver][SQL Server]The statementhas been terminated. (SQL-01000) at .insert.pl line 106. How do I find out what column is generating that error and lacks the length for the input? Is there a way to do this without brute force-guessing all the varchar?How do I fix string or binary data would be truncated in SQL server?


Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.