Hi,
I am having trouble importing a CSV file with double quote as a text delimiter. The problem arises because one of the text fields has double quotes embedded in it. This file loads perfectly in SQL 2000 DTS, but SQL 2005 SSIS will fail on the flat file source.
I would appreciate any input on this.
Thank you,
Nick Russo

Trouble importing csv with flat file source
Nga Nguyen
Seems like bit of step backwards. Why not log it via MSDN Product Feedback.
As a workaround turn off the text qualifier and tweak the column delimiters in the Advanced tab of the connection. Set the preceding column delimiter to be {,}" and qualified column to be "{,} or "{CR}{LF}
It is not perfect and may break if you have that pattern embedded as you will not look for the escape character.
Assuming any embedded double-quotes have been escaped, (doubled), then you could clean this in the pipeline, try a Derived Column set to replace the column, using the replace function, e.g.
REPLACE([Column 1], "\"\"", "\"")
TomBilly4554
Craig, I can't reproduce the failure you're encountering. Here's what I tried:
I created an ANSI text file in notepad with the following contents:
1,"A",X
2,"A,B",Y
Then I configured a connection manager with:
Locale: English (United States)
Code Page: 1252
Format: Delimited
Text Qualifier: "
What are you doing differently
yaipaaa
Craig
Jerone
I've been having a similar problem with SSIS using a flat file source to import a CSV file. The text qualifier is set to " but the columns still seem to be splitting on delimiters found within the text field, i.e.
1, "A", X is fine and splits into 3 columns, but
2, "A,B", Y splits into 4 columns because of the comma within the text
Since Excel, Access, DTS, etc. all import the file as one would expect, I imagine that I'm making a very simple error somewhere - although I would expect the default behaviour to be similar to the other packages.
Regards
Craig
Jay P
Craig, have you tried removing the spaces after the commas
David L. King
This means that if " is your text qualifier there better not be any in the data.
I got around this by using a flat file source with one string column (the entire line), and a script transformation to parse it into columns. It's a pain to have to write your own parsing code, but I don't know any other way.