title: Keep getting import error "String data, right truncation" using BCP
body: <p>I've hit a problem. I'm trying to use BCP to import about 700,000 records into a working table. </p>
  
  <p>This is the SQL I use to build my working table:</p>
  
  <pre><code>If Exists (Select * From sys.tables Where [name] = 'InactiveIDs')
      Begin 
          Drop Table [dbo].[InactiveIDs]
      End
  
  Create Table [dbo].[InactiveIDs] (
      ContactId UniqueIdentifier Not Null,
      ID Varchar(50),
      EmailAddress VarChar(255) Not Null
  )
  
  Create Index IX_ContactIdEmailAddress
      On [dbo].[InactiveIDs] (ContactId, EmailAddress)
  </code></pre>
  
  <p>Here is the format file file:</p>
  
  <pre><code>13.0
  3
  1       SQLUNIQUEID         1       36      ","        1     ContactId                    ""
  2       SQLCHAR             2       50      ","        2     ID                           SQL_Latin1_General_CP1_CI_AS
  3       SQLCHAR             2       255     "\r\n"     3     EmailAddress                 SQL_Latin1_General_CP1_CI_AS
  </code></pre>
  
  <p>Here is some sample data:</p>
  
  <pre><code>CBD60121-C5E1-E511-B2B4-005056820129,199e6799e3c64b06a87e86a5047e5f41,someone@verizon.com
  3D22A4C2-507B-E411-99C7-005056820126,76410ce5beab4a7da943b95b3de3b0c1,someone@gmail.com
  AE5B9335-B126-E611-ABF2-005056820020,e7d181abdf154f79b5dcaa4d64fec7f7,someone@yahoo.com
  93F94F65-FA2A-E311-87A7-005056B5025F,3e2fae28cace4f068fa670879d7807e3,someone@juno.com
  0A41305C-C087-E411-A37D-00505682001E,55b0162742b04a369c1c57d8d917d45c,someoneelse@yahoo.com
  </code></pre>
  
  <p>Here's my command line:</p>
  
  <pre><code>bcp.exe dbo.InactiveIDs in InactiveIDs.csv -f InactiveIDs.bcp.fmt -T -S SqlServerName -d DatabaseName
  </code></pre>
  
  <p>Here is the output:</p>
  
  <pre><code>Starting copy...
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  SQLState = 22001, NativeError = 0
  Error = [Microsoft][ODBC Driver 13 for SQL Server]String data, right truncation
  
  BCP copy in failed
  </code></pre>