备注字段中的双引号导致解析问题 [英] double quotes in memo field causing parsing issues

查看:141
本文介绍了备注字段中的双引号导致解析问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在开发一个从商业网站导入CSV文件的数据库。该文件是一个CSV文件,带有双引号以标识文本。在这个文件中,有一个备忘录字段,人们偶尔会使用双引号。这导致解析破坏b / c csv /文本文件生成器将其与字符串的末尾混淆。


我知道使用两个双引号是一种获取方式围绕这个,但我不能让csv文件以这种方式输出数据。还有其他的解决方法吗?


谢谢


托德

解决方案

< a href =https://bytes.com/topic/access/answers/870731-double-quotes-memo-field-causing-parsing-issues#post3495176 =nofollowclass =at_reply> @tfurubay


低级别I / O函数如何将所有双引号(")转换为单引号(")导入CSV文件,如下所示:

展开 | 选择 | Wrap | 行号





谢谢你的帮助。我在哪里建立这个功能?在模块中?我只是将其粘贴并更改文件名吗?


并将语法转为


这个:

joe,smith,我被认为是旧的在我的家庭中


到此:

" joe",smith,我在家里被认为是''老'' ;?


谢谢,


Todd


@tfurubay


不,它会将Double Quotes转换为Single Quotes,我认为这是初衷。

展开 | 选择 | Wrap | 行号

Hi,

I am developing a DB that imports a CSV file from a commerce site. The file is a CSV file with double quotes to identify text. In this file, there is a memo field where people occassionally use double quotes. This causes the parsing to corrupt b/c the csv/text file generator is confusing this with the end of the string.

I am aware that using two double quotes is a way to get around this but i am not able to get the csv file to output data this way. is there any other workaround?

thanks

Todd

解决方案

@tfurubay
How about Low Level I/O Functions to Convert all Double Quotes ("") to Single Quotes (") immediately before Importing the CSV File as in:

Expand|Select|Wrap|Line Numbers


Hi,

thank you for your kind assistance. where do i build this function? In a module? do i just paste it in and change the file name?

and will the syntax turn

this:
"joe","smith","I am considered "old" in my family"

to this:
"joe","smith","I am considered ''old'' in my family"?

thanks,

Todd


@tfurubay
No, it will convert Double Quotes to Single Quotes, which I thought was the original intention.

Expand|Select|Wrap|Line Numbers


这篇关于备注字段中的双引号导致解析问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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