title: SQL Server insert value with leading whitespace
body: <p>I have a <code>C#</code> program that reads from a file and inserts the data into fields in my database. </p>
  
  <p>An issue I'm having is that it's not inserting data when the value starts with a leading space. The datatype is <code>NCHAR</code>. for example, when i try to read and insert <code>" 2"</code>, nothing inserts into that field even though it's mapped properly. Is there a way around this?</p>
  
  <pre><code>table2_1.MONTHS_DOWN_PAY = mylines02[i].Substring(58, 2).Trim();
  </code></pre>
  
  <p>value it's grabbing from text file: " 0"</p>
  
  <p>SQL field: <code>MONTHS_DOWN_PAY nchar(2) NULL</code></p>