如何在导入 CSV 文件时删除文本周围的双引号? [英] How to remove double quotes surrounding the text while importing a CSV file?

查看:106
本文介绍了如何在导入 CSV 文件时删除文本周围的双引号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有类似于以下内容的数据:

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?

推荐答案

进一步搜索发现我应该使用 GeneralText Qualifier> 平面文件源选项卡.

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

在 Notepad++ 中查看时的平面文件内容.CRLF 表示行以 Carriage ReturnLine Feed 结尾.

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

在平面文件连接管理器上,在 Text qualifier 文本框中输入双引号.

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

设置文本限定符后,数据将被正确解析并显示如下:

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

这篇关于如何在导入 CSV 文件时删除文本周围的双引号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆