查询太复杂了 [英] Query too Complex

查看:115
本文介绍了查询太复杂了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!我有一个相当大的更新查询,我不断收到查询过于复杂的问题。错误。有谁知道MS Access 2000更新查询的限制?我在Windows XP上运行。该查询对大约35个表有大约95个动作(更新)。谢谢您的信息!


Sloney

Hello All! I have an update query that is rather large and I keep getting a "Query is too complex" error. Does anyone know the limitations on update queries for MS Access 2000? I am running on Windows XP. The query has about 95 actions (updates) for approximately 35 tables. Thank you for the info!

Sloney

推荐答案

我认为您别无选择,只能将查询分解为更多可管理的组件;正如您将从MS知识库文章中看到的那样,链接到此处早期版本的JET数据库引擎在发生查询太复杂错误之前,有40个字段(现在是99个字段)的限制。这篇文章解释了原因。

无论如何,如果你需要更新95个属性,如果没有别的东西可以将它分解成顺序运行的多个更新,那将有助于维护。


-Stewart
I think you have no choice but to break your query down into more manageable components; as you will see from the MS Knowledge Base article linked here, earlier versions of the JET database engine had a limit of 40 fields (now 99 fields) before a ''Query Too Complex'' error would occur. The article explains why.

Anyhow, if you need 95 attributes updated it would help maintainability if nothing else to break it down into multiple updates that are run sequentially.

-Stewart


我担心我不知道有什么限制,但如果我有那么多表,我会考虑将这个查询分成多个查询更新 - 甚至包含更少的表实际更新的时间。


PS。无论如何,斯图尔特在那里有一个更好的答案,尽管它并不是我想的那么远(p!)
I''m afraid I have no idea what the limitations are, but I would consider breaking this query into multiple queries if I had that many tables to update - or even to include when fewer tables are actually updated.

PS. Stewart nicked in there with a better answer anyway, although it''s not too far what I was thinking (phew!)


根据我今晚读到的内容我应该能够跑此更新查询为Docmd RunSQL。请把我拉直,因为我是新手,我可能会错过或不清楚。


无论如何,基于MSDN网站(http://msdn.microsoft.com/en-us/library/aa141546(office.10).aspx),似乎" sqlstatement参数的最大长度为32,768个字符(与宏窗口中的SQL语句操作参数不同,其最大长度为256个字符)。


我的想法是我应该能够运行所需的查询。当我把它带到SQL视图时,有不到5000个字符。我可以分解它,但有趣的是!我需要对20多个共享相同表名和字段的数据库使用此查询。如果我可以将其限制为最合适的一个或两个查询。 Sooo,看来我面前有一些故障排除。就在最近,我尝试将Docmd RunSQL用作Access中的模块。我试图在一个表上运行测试并从那里构建。下面是我所拥有的,它不断收到语法错误3114.

Based on what I read this evening I should be able to run this update query as a Docmd RunSQL. Please straighten me out where I may misspeak or not clearly understand as I am a newbie.

Anyways, based on the MSDN website (http://msdn.microsoft.com/en-us/library/aa141546(office.10).aspx) it appears that "The maximum length of the sqlstatement argument is 32,768 characters (unlike the SQL Statement action argument in the Macro window, whose maximum length is 256 characters)."

My thought is that I should be able to run the desired query. When I brought it into SQL view there are just under 5000 characters. I could break it down but what fun is that! I need to use this query for 20+ databases that share the same table names and fields. If I could limit it to one or two query that would be most suitable. Sooo, it appears that I have some troubleshooting in front of me. Just recently I have tried using the Docmd RunSQL as a module in Access. I am trying to run a test on one table and build from there. Below is what I have and it keep getting a syntax error 3114.

展开 | 选择 | Wrap | 行号


这篇关于查询太复杂了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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