问题
I'm working in SQL Server 2008 R2. I have an SSIS package that imports a csv file into a table. The given csv file is quote-qualified. Because the file is quote-qualified, in its corresponding flat file connection, I specified Text qualifier = ". However, the import fails because of a particular row in the file. The given row has quotes inside of quotes. For example:
"a","1","","text""moretext","","1.0"
The package throws the error:
The column delimiter for column <> was not found.
I still want the row (and rows like it) to be imported. How can I handle this in SSIS?
回答1:
You can't do it with a flat file source.
You can write a custom script (either a complete script task or a script source component), or you can import it with BCP and a format file.
来源:https://stackoverflow.com/questions/47191336/ssis-how-to-handle-a-quote-qualified-csv-file-with-quotes-inside-quotes