Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Import csv with SSIS error Expand / Collapse
Posted Tuesday, February 11, 2014 7:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 25, 2014 5:20 PM
Points: 1, Visits: 26
I’m trying to import data from CSV to SQL Server 2012 and I’m using SSIS 2012.

CSV file data:
“123”,”abc “xyz” wxy”

The data should read into the database as
Field1 Field2
abc abc “xyz” wxy

The problem is in ”abc “xyz” wxy”
if I add another set of double quotes inside the field double quotes it will work.
”abc ““xyz”” wxy”

Anyway I can fix this without writing a text parser?
Post #1540523
Posted Wednesday, February 12, 2014 3:46 AM



Group: General Forum Members
Last Login: Yesterday @ 6:23 AM
Points: 15,499, Visits: 13,162
According to the official blogs, you indeed need to escape the qualifier inside the column (2 times double quotes).

Flat File Source Changes in Denali

What happens if you don't add the extra double quotes? Do you get an error message?

How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1540608
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse