在 MS Access 中管理和调试 SQL 查询 [英] Managing and debugging SQL queries in MS Access

查看:28
本文介绍了在 MS Access 中管理和调试 SQL 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MS Access 管理原始 SQL 查询的能力有限:编辑器非常糟糕,没有语法突出显示,它将原始 SQL 重新格式化为长字符串,并且您无法插入注释.

MS Access has limited capabilities to manage raw SQL queries: the editor is quite bad, no syntax highlighting, it reformats your raw SQL into a long string and you can't insert comments.

调试复杂的 SQL 查询也很痛苦:要么您必须将其拆分为许多较小的查询,这些查询在架构更改时变得难以管理,要么最终得到一个巨大的查询,这对于调试和更新来说是一场噩梦.

Debugging complex SQL queries is a pain as well: either you have to split it into many smaller queries that become difficult to manage when your schema changes or you end-up with a giant query that is a nightmare to debug and update.

您如何在 MS Access 中管理复杂的 SQL 查询以及如何调试它们?

How do you manage your complex SQL queries in MS Access and how do you debug them?

编辑
目前,我主要使用 Notepad++ 进行一些语法着色和 <一个 href="http://www.wangz.net/" rel="noreferrer">SQL 漂亮打印机,用于从 Access 中明智地重新格式化原始 SQL.
使用外部存储库很有用,但始终存在使两个版本不同步的风险,并且您仍然必须在尝试在 Access 中进行查询之前删除注释...

Edit
At the moment, I'm mostly just using Notepad++ for some syntax colouring and SQL Pretty Printer for reformatting sensibly the raw SQL from Access.
Using an external repository is useful but keeping there's always the risk of getting the two versions out of sync and you still have to remove comments before trying the query in Access...

推荐答案

为了调试,我在一个单独的文本编辑器中编辑它们,让我可以合理地格式化它们.当我发现需要进行更改时,我会在文本编辑器中编辑版本,然后将其粘贴回 Access,而从不在 Access 中编辑版本.

For debugging, I edit them in a separate text editor that lets me format them sensibly. When I find I need to make changes, I edit the version in the text editor, and paste it back to Access, never editing the version in Access.

仍然是主要的 PITA.

Still a major PITA.

这篇关于在 MS Access 中管理和调试 SQL 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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