如何阻止 Access“更正”我的疑问?
当我在 Access 中有子查询时,它会尝试在不询问的情况下“更正”它们,并在此过程中中断查询。例如,
从 TblA LEFT JOIN 选择 *(从 [TblB] 并集选择 * 从 [TblC] 选择 *)作为 SubQry On TblA.Whatever = SubQry.Whatever
当我第一次运行它时,这工作正常。但是,在我保存它并尝试重新打开它后,Access 尝试提供“帮助”并将括号更改为方括号:
从 TblA LEFT JOIN 选择 * [从 [TblB] 并集选择 * 从 [TblC] 选择 *]。作为 TblA.Whatever 上的 SubQry = SubQry.Whatever
当然,这会引发错误。选项菜单中是否有一个选项可以切换以使 Access 停止尝试“帮助”我?
(脚注:实际的表名比“TblB”更复杂,需要放在括号中才能被识别)。
When I have subqueries in Access, it tries to 'correct' them without asking and breaks the query in the process. For example,
Select * from TblA LEFT JOIN (Select * from [TblB] union Select * from [TblC]) as SubQry On TblA.Whatever = SubQry.Whatever
This works fine when I run it the first time. However, after I save it and try to reopen it, Access tries to be 'helpful' and changes the parens to brackets:
Select * from TblA LEFT JOIN [Select * from [TblB] union Select * from [TblC]]. as SubQry On TblA.Whatever = SubQry.Whatever
Of course, this throws an error. Is there an option somewhere in the options menu I can toggle to make Access stop trying to 'help' me?
(Footnote: The actual table names are more complex than "TblB" and need to be in brackets to be recognized).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AFAIK,你不能。子查询周围的括号始终更改为方括号,如果要重新保存,则必须恢复此设置。
您所能做的就是将子查询保存为单独的查询并使用该查询,直到您的应用程序真正稳定为止,然后将子查询集成到主查询中。
AFAIK, you can't. Parentheses aroud your subqueries are always changed to square brackets, and you have to revert this if you want to re-save.
All you could do is save the sub query as a separate query and use that one until you application is really stable, and then integrate the sub query in the main one.