有人可以帮我这个代码吗?它继续抛出错误 [英] Can somebody please help me with this code? it continues to throw up errors

查看:107
本文介绍了有人可以帮我这个代码吗?它继续抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SELECT TBL_OUTPUT_TWO.COMPLEX_NO, First(TBL_MASTER.COMPLEX_NA) AS FirstOfCOMPLEX_NA, Max(TBL_OUTPUT_TWO.CONSERVATION_TOTAL) AS MaxOfCONSERVATION_TOTAL, Avg(TBL_OUTPUT_TWO.CONSERVATION_TOTAL) AS AvgOfCONSERVATION_TOTAL, StDev(TBL_OUTPUT_TWO.CONSERVATION_TOTAL) AS StDevOfCONSERVATION_TOTAL, Max(TBL_OUTPUT_TWO.THREATS_TOTAL) AS MaxOfTHREATS_TOTAL, Avg(TBL_OUTPUT_TWO.THREATS_TOTAL) AS AvgOfTHREATS_TOTAL, StDev(TBL_OUTPUT_TWO.THREATS_TOTAL) AS StDevOfTHREATS_TOTAL, Sum(TBL_OUTPUT_TWO.AREA_HA) AS SumOfAREA_HA, First(TBL_OUTPUT_TWO.CMA) AS FirstOfCMA, First(TBL_OUTPUT_TWO.LGA) AS FirstOfLGA, First(TBL_OUTPUT_TWO.SUBCATCH) AS FirstOfSUBCATCH, First(TBL_OUTPUT_TWO.SUBREGION) AS FirstOfSUBREGION, Count(TBL_OUTPUT_TWO.COMPLEX_NO) AS CountOfCOMPLEX_NO, First(TBL_OUTPUT_TWO.CATCHMENT) AS FirstOfCATCHMENT, [MaxOfCONSERVATION_TOTAL]+[AvgOfCONSERVATION_TOTAL] AS Priority_Score
FROM TBL_OUTPUT_TWO INNER JOIN TBL_MASTER ON TBL_OUTPUT_TWO.POLY_ID=TBL_MASTER.POLY_ID
GROUP BY TBL_OUTPUT_TWO.COMPLEX_NO
HAVING (((TBL_OUTPUT_TWO.COMPLEX_NO)<>0) AND ((First(TBL_OUTPUT_TWO.CMA)) Like "*" & [Enter CMA or OK] & "*") AND ((First(TBL_OUTPUT_TWO.LGA)) Like "*" & [Enter LGA or OK] & "*") AND ((First(TBL_OUTPUT_TWO.CATCHMENT)) Like "*" & [Enter CATCHMENT or OK] & "*") AND ((First(TBL_OUTPUT_TWO.SUBREGION)) Like "*" & [Enter CMA SUB REGION or OK] & "*") AND ((First(TBL_OUTPUT_TWO.COMPLEX_NO)) Like "*" & [Enter COMPLEX NUMBER or OK] & "*") AND ((First(TBL_OUTPUT_TWO.COMPLEX_NA)) Like "*" & [Enter COMPLEX NAME or OK] & "*") AND ((First(TBL_OUTPUT_TWO.SUBCATCH)) Like "*" & [Enter CMA SUB CATCHMENT or OK] & "*"));

推荐答案

首先,正确标记您的问题.然后告诉我们您得到的错误.然后告诉我们您希望此代码做什么.

进行此复杂查询的一个很好的第一步是将其分解为您可以使用的最简单的版本,然后一次构建它,以便您可以找出错误的出处.
First, tag your question properly. Then tell us the errors you get. Then tell us what you want this code to do.

A good first step with a query this complex, is to break it down to the simplest version you can, then build it a step at a time, so you can work out where your error is.


类似语句中有错误,请提供正确的括号

对于这种类型的查询,您需要先检查各种条件,然后再逐一评估,这样可以节省您的时间和精力.

请指定错误以及您的问题,以便轻松给出正确答案...
There is error in like statement please give proper brackets

For such type of queries where u are checking various conditions then evaluate one by one, it will save your time and efforts.

Please specifify error along with your questions so that it will be easy to give correct answers...


大家好,抱歉这个模糊的问题.我对此非常陌生:)我使用ms access 2003,收到的错误消息是:

该表达式的输入错误,或者太复杂而无法评估.例如,一个数字表达式可能包含太多复杂的元素.尝试通过将表达式的一部分分配给变量来简化表达式.

非常感谢您的任何帮助

干杯
Hey guys, Sorry about the vague question. Im very new to this :) Im using ms access 2003 and the error im receiving is:

This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.

Any help is very much appreciated

Cheers


这篇关于有人可以帮我这个代码吗?它继续抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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