SSIS: how to handle a quote-qualified csv file with quotes inside quotes

人盡茶涼 提交于 2020-06-27 16:40:29

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!