title: sql bulk insert with additional column
body: <p>A csv file contains 8 columns (col1, col2, ..., col8) and the name of the file contains the date which has to be inserted into the table as well.</p>
  
  <p>If the number of columns in the table and columns in the csv file are equal the following query imports all the records from the file to the table:</p>
  
  <pre><code>query += "BULK INSERT real_data FROM '" + path + "' WITH (FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')";
  </code></pre>
  
  <p>So far I haven't found a solution to modify the query such that the new records can contain the date extracted from the filename. Anyway I have created a function to extract the date:</p>
  
  <pre><code>DateTime eventTime = extractDate(path);
  </code></pre>
  
  <p>and would like to insert eventTime into 9th column for each record imported from file. </p>
  
  <p>Does anyone know how to modify/create query statement to import 8 columns from file and add the date as 9th column for each imported record?</p>
  
  <p>Thank you!</p>