title: BCP bulk import throws 'Invalid character value for cast specification' on first line
body: <p>I'm tyring to import data to Azure SQL using the BCP utility. The data file has not been created by BCP export, but by me.</p>
  
  <p>A line of the data file looks like this:</p>
  
  <blockquote>
    <p>61b7d233-b6ee-47df-862f-46adfc487eae;Calcimycin;;;;;;;;enUS;0;1;0;0;MeSH</p>
  </blockquote>
  
  <p>As you can see, there are no DateTime's involved, which are known to <a href="https://stackoverflow.com/questions/4032887/invalid-character-value-for-cast-specification">cause the problem</a>.</p>
  
  <p>The BCP command:</p>
  
  <blockquote>
    <p>bcp dbo.Word in Word.txt -c -t; -S auu5nuabcl.database.windows.net -d
    dbname -U username -P pass -e error.txt</p>
  </blockquote>
  
  <p>The import works apart from that the first line in the data file is not imported. The error file says:</p>
  
  <pre><code>#@ Row 1, Column 1: Invalid character value for cast specification @# 61b7d233-b6ee-47df-862f-46adfc487eae  Calcimycin                              enUS    0   1   0   0   MeSH
  </code></pre>
  
  <p>All other lines of the file are imported correctly. The file is created automatically by code I've written, so there is no difference in the first line of the data file and the others.</p>
  
  <p>What could be the cause for this problem?</p>
  
  <p>There is a similar but unanswered question <a href="https://stackoverflow.com/questions/31339664/bcp-import-error-invalid-character-value-for-cast-specification">here</a>.</p>
  
  <p>Addtional information:</p>
  
  <p>This is the table in SQL:</p>
  
  <pre><code>CREATE TABLE skicocat.dbo.Word (
    Id uniqueidentifier NOT NULL,
    NominativeSingular nvarchar(max) NOT NULL DEFAULT (''),
    NominativePlural nvarchar(max) NOT NULL DEFAULT (''),
    GenitiveSingular nvarchar(max) NOT NULL DEFAULT (''),
    GenitivePlural nvarchar(max) NOT NULL DEFAULT (''),
    DativeSingular nvarchar(max) NOT NULL DEFAULT (''),
    DativePlural nvarchar(max) NOT NULL DEFAULT (''),
    AccusativeSingular nvarchar(max) NOT NULL DEFAULT (''),
    AccusativePlural nvarchar(max) NOT NULL DEFAULT (''),
    Culture nvarchar(50) NOT NULL DEFAULT ('en-US'),
    IsCaseSensitive bit NOT NULL DEFAULT (0),
    IsDisplayName bit NOT NULL DEFAULT (0),
    IsAmbient bit NOT NULL DEFAULT (0),
    Hits bigint NOT NULL DEFAULT (0),
    Comment nvarchar(max) NULL DEFAULT (''),
    CONSTRAINT PK_Word PRIMARY KEY CLUSTERED (Id)
  )
  </code></pre>