Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove double quotes surrounding the text while importing a CSV file?

I have data which resembles the following:

"D.STEIN","DS","01","ALTRES","TTTTTTFFTT" 
"D.STEIN","DS","01","APCASH","TTTTTTFFTT" 
"D.STEIN","DS","01","APINH","TTTTTTFFTT" 
"D.STEIN","DS","01","APINV","TTTTTTFFTT" 
"D.STEIN","DS","01","APMISC","TTTTTTFFTT" 
"D.STEIN","DS","01","APPCHK","TTTTTTFFTT" 
"D.STEIN","DS","01","APWLNK","TTTTTTFFTT" 
"D.STEIN","DS","01","ARCOM","TTTTTTFFTT" 
"D.STEIN","DS","01","ARINV","TTTTTTFFTT" 

I've used a Flat File Source Editor to load the data. What is the easiest way to remove all of the double quotes?

like image 300
DavidStein Avatar asked Mar 26 '10 13:03

DavidStein


1 Answers

Further searching revealed that I should use the Text Qualifier on the General Tab of the Flat File Source.

Flat file content when viewed in a Notepad++. CRLF denotes that the lines end with Carriage Return and Line Feed.

Flat file in Notepad++

On the flat file connection manager, enter the double quotes in the Text qualifier text box.

General tab of the flat file connection manager

Once the text qualifier is set, the data would be parsed correctly and displayed as shown below:

Columns tab of the flat file connection manager

like image 67
DavidStein Avatar answered Oct 15 '22 21:10

DavidStein