Info

You are currently browsing the Blog weblog archives for the day 11. June 2009.

Calendar
June 2009
S M T W T F S
« Feb   Jul »
 123456
78910111213
14151617181920
21222324252627
282930  
Categories

Archive for 11. June 2009

Quick and Dirty CSV import to SQL Server

You can use LogParser (a free, unsupported utility from Microsoft) to quickly import a CSV file into a SQL Server table using syntax like this:

logparser “SELECT * INTO MyTable FROM d:\MyFile.csv” -i:csv -o:SQL -server:MyServer -database:MyDatabase -createTable:ON

There are many other uses for LogParser.  Two of the most common are analyzing Windows Event Logs and IIS logs. 

|