Advertisement

04.10.2008 at 03:02PM PDT, ID: 23313535
[x]
Attachment Details

Bulk Insert a CSV file with Delimiters also present in quotations

Asked by LordSM in MS SQL Server, Databases Miscellaneous, Programming for ASP.NET

Tags: Microsoft, Sql Server, 2005

I am trying to Insert data from a CSV file to SQL server 2005. Certain columns in the CSV file have a comma in them which is put together between quotations (" "). Ex: 12, xde, "drt,4,gw4" has 3 columns
[12], [xde] and [drt,4,gw4].
While performing a bulk insert to SQL server, with  ',' as FIELDTERMINATOR, It does not accept [drt,4,gw4] as one column.  The number of commas in this column varies from row to row.

How can I Import such a CSV file to SQL server table?Start Free Trial
[+][-]04.10.2008 at 06:16PM PDT, ID: 21330768

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 09:40PM PDT, ID: 21331407

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, Databases Miscellaneous, Programming for ASP.NET
Tags: Microsoft, Sql Server, 2005
Sign Up Now!
Solution Provided By: cm0605
Participating Experts: 5
Solution Grade: A
 
 
[+][-]04.11.2008 at 02:00AM PDT, ID: 21332343

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.11.2008 at 07:30AM PDT, ID: 21334593

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628