Importing CSV Files to SQL Server with PowerShell

Ed Wilson (Blog|Twitter) aka Scripting Guy is kicking off another guest blogger week  (Nov 28th 2011) with my guest blog post, Four Easy Ways to Import CSV Files to SQL Server with PowerShell. The post demonstrates the following approaches to importing CSVs into a SQL Server table:

  • T-SQL BULK INSERT command
  • LogParser command-line
  • LogParser COM-based scripting
  • A Windows Powershell-based approach using several functions
Most of the time I’ll I use BULK-INSERT or the Windows Powershell-based approach, although as explained in the post the ability of LogParser to automatically create a SQL table based on a CSV is pretty handy.
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
One Response to Importing CSV Files to SQL Server with PowerShell
  1. [...] was looking at Chad Millers(Blog|Twitter) post ‘Importing CSV Files to SQL Server‘ which was part of Ed Wilson’s (Blog|Twitter) guest blogger week and thought I would [...]

Leave a Reply

Wanting to leave an <em>phasis on your comment?

Trackback URL http://sev17.com/2011/11/importing-csv-files-to-sql-server-with-powershell/trackback/