0

I'm trying to upload data from a CSV file into a SQL server table through SSIS package (Flat File source and OLEDB destination). This CSV has comma as column delimiter and {CR}{LF} as row delimiter. This csv file has one column which holds XML data in it. In this XML, they again used {CR}{LF} to make it as a multi-line XML and this XML is placed within a double quotes (""). Ideally, this whole XML needs to be placed in one column however {CR}{LF} makes it as a new row in my table.

Is there any method to have escape sequence and place the whole XML data into a single column?

I'm using Visual studio 2013 and connected to SQL server 2014 database.

Thanks.

1

In the flat-file connection manager, in the General pane, there is an option to set a text qualifier. If you set this to double quote (") for your file then SSIS should ignore any row delimiters that are contained between the double quotes.

There is also an AlwaysCheckForRowDelimiters property that could help. See this msdn page for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.