title: Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (Year)
body: <p>I'm getting the conversion error when I try to import a text file to my database. Below is the error message I received:</p>
  
  <p>Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 4 (Year).</p>
  
  <p>Here is my query code:</p>
  
  <pre><code>CREATE TABLE Students
  (
      StudentNo    Integer NOT NULL Primary Key,
      FirstName    VARCHAR(40) NOT NULL,
      LastName     VARCHAR(40) NOT NULL,
      Year         Integer,
      GPA          Float NULL
  );
  </code></pre>
  
  <p>Here is the sample data from text file:</p>
  
  <pre><code>100,Christoph,Van Gerwen,2011
  101,Anar,Cooke,2011
  102,Douglis,Rudinow,2008
  </code></pre>
  
  <p>I think I know what the problem is..Below is my bulk insert code:</p>
  
  <pre><code>use xta9354
  bulk insert xta9354.dbo.Students
  from 'd:\userdata\xta9_Students.txt' 
  with (fieldterminator = ',',rowterminator = '\n') 
  </code></pre>
  
  <p>With the sample data, there is no ',' after the Year attribute even tho there is still another attribute Grade after the Year which is NULL</p>
  
  <p>Can someone please tell me how to fix this?</p>