Insert Into sql语句中的语法错误 [英] Syntax error in Insert Into sql statement

查看:112
本文介绍了Insert Into sql语句中的语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。


我正在尝试执行以下SQL语句,但是我收到了语法错误

展开 | 选择 | Wrap | 行号

解决方案

好好玩弄它后,罪魁祸首似乎是日期。这是保留字吗?


有什么方法吗?


谢谢!


< blockquote>使用括号(实际上 - 最好不要在任何可能的地方使用保留字)。


EG。 [日期]


@NeoPa:


感谢您的回复。我必须在工作时测试它。


我尝试做table.column,但没有运气。


只有其他方法是将其重命名为其他方式,但不确定该表在VBA中使用的其他位置。所以它可能会产生问题,我绝对不希望这种情况发生:)


Hi.

I am trying to execute the following SQL statement, but I''m getting a syntax error

Expand|Select|Wrap|Line Numbers

解决方案

ok after playing around with it, the culprit seems to be the "date" bc it''s a reserved word?

is there any way around this?

thanks!


Use brackets (Actually - better not to use reserved words at all where possible) around it.

EG. [Date].


@NeoPa:

thanks for the reply. I''ll have to test that out when im at work.

I tried doing table.column, but no luck.

The only other way would be to rename it to something else, but not sure where else the table is used in VBA. so it might create problems, which I definitely do not want that to happen :)


这篇关于Insert Into sql语句中的语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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