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.

{ 0 comments… add one }

Leave a Comment


7 + five =

%d bloggers like this: