SSIS remove unwanted double quotes

SSIS has trouble processing embedded quadruple quotes.  Although my issue was with quadruple quotes, this script task could be used to remove any double quotes as well.

1,2,”These double quotes are “”inside”” other double quotes”, 4

The way to remove unwanted double quote or other characters was to use a script task.

Just run this Script Task before processing the file.

/* Script by GlutenFree SQL, Daniel Gras, 7/13/2013 */

public void Main()
// TODO: Add your code here
string filepath = (string)Dts.Variables["SourceTextFile"].Value;
var fileContents = System.IO.File.ReadAllText(filepath);
fileContents = fileContents.Replace("\"\"", "");

System.IO.File.WriteAllText(filepath, fileContents);


Here is where I got most of my information:

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s