替换SQL插入的记录集中的撇号 [英] Replacing apostrophe in a recordset for SQL insert

查看:58
本文介绍了替换SQL插入的记录集中的撇号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


我正在尝试从一个表中获取数据并将其插入另一个表中。我遇到的问题是记录集中的数据可能包含撇号,这会完全杀死我的SQL插件。

展开 | 选择 | 换行 | 行号

解决方案

试试这个...

展开 | 选择 | Wrap | 行号


在它尝试写入的第一个值上返回错误:查询表达式中的语法错误(缺少运算符)。


在Debug中,我可以将鼠标悬停在它所说的错误表达式上,并且它(以及所有其他表达式)包含预期的数据。


尝试这...

展开 | 选择 | Wrap | 行号

Hello!

I am attempting to take data from one table and insert it into another. I am encountering problems where data in a recordset may contain an apostrophe, which completely kills my SQL Insert.

Expand|Select|Wrap|Line Numbers

解决方案

Try this ...

Expand|Select|Wrap|Line Numbers


That returns an error on the first value it tries to write: "Syntax error (missing operator) in query expression."

In Debug, I can hover over the expression it is saying is in error, and it (along with all other expressions) contain the data that is expected.


Try this ...

Expand|Select|Wrap|Line Numbers


这篇关于替换SQL插入的记录集中的撇号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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