title: SQL Server Insert Statement From a CSV File
body: <p>I'm trying to follow the example on this page:</p>
  
  <blockquote>
    <p><a href="http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/" rel="nofollow">http://blog.sqlauthority.com/2008/02/06/sql-server-import-csv-file-into-sql-server-using-bulk-insert-load-comma-delimited-file-into-sql-server/</a></p>
  </blockquote>
  
  <p>The database is on another machine and I'm connecting to it using SQL Server Management Studio 2012.</p>
  
  <p>Here's the insert statement</p>
  
  <pre><code>BULK
  INSERT CSVTest
  FROM '\\BPWKS\network share\csvtest.csv'
  WITH
  (
  FIELDTERMINATOR = ',',
  ROWTERMINATOR = '\n'
  )
  GO
  </code></pre>
  
  <p>When I go to check the content of the table, I get the following error:</p>
  
  <blockquote>
    <p>Error: Msg 208, Level 16, State 82, Line 1<br>
    Invalid object name 'CSVTest'.</p>
  </blockquote>
  
  <p><em>Table Definition</em></p>
  
  <pre><code>Create Table CSVTest 
  (
  ID INT, 
  FirstName VARCHAR(40), 
  LastName VARCHAR(40), 
  BirthDate SMALLDATETIME
  ) 
  GO
  </code></pre>
  
  <p>I've also tried importing the local file at <code>'C:\csvtest.csv'</code></p>