Importing a CSV file without headers into SQL 2008

Posted by Luiggi on Stack Overflow See other posts from Stack Overflow or by Luiggi
Published on 2010-05-16T14:34:47Z Indexed on 2010/05/16 14:40 UTC
Read the original article Hit count: 228

Filed under:
|
|
|

I want to import a CSV with 4,8M records into a SQL 2008 table. I'm trying to do it with the Management Studio wizard but it keeps trying to recognize a header row which the CSV doesnt have. I don't find any option to skip this and although I specify the columns myself, the wizard still tries to find a header row and doesnt import anything without it.

The structure of the CSV is

"818180","25529","Dario","Pereyra","Rosario","SF","2010-09-02"

I've also tried alternatives like BULK INSERT but then I find out that with BULK INSERT I can't import files with a text qualifier.

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about import