title: Using SQL Server, how do I manually set a given column's value during a Bulk Insert of a CSV file?
body: <p><strong>Background</strong>:</p>
  
  <p>I have a collection of CSV files that each have the same data structure. Each file was generated on a given calendar day so, for example, I might have one file from 10/8/13 with 20,000 records, one file from 10/9/13 with 50,000 records, and so on.</p>
  
  <p>All of this CSV data needs to be imported into a SQL Server table, but I have added a column for <code>RecordDate</code> which needs to be set to the value of the day the record was generated.</p>
  
  <p>In total, I have fourteen of these CSV files, so I don't mind running fourteen bulk insert operations like this one:</p>
  
  <pre><code>BULK INSERT CSVTest
  FROM 'c:\csvtest.txt'
  WITH
  (
  FIELDTERMINATOR = ',',
  ROWTERMINATOR = '\n'
  )
  GO
  </code></pre>
  
  <p>But each time I do this, I need to set that <code>RecordDate</code> column to the date that the particular CSV I am inserting was generated.</p>
  
  <p><strong>Question</strong>:</p>
  
  <p>How do I manually set a given column's value during a bulk Insert of a CSV file?</p>