最大日期似乎没有给出最大日期 [英] Max Date doesn't seem to give maximum date

查看:76
本文介绍了最大日期似乎没有给出最大日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行此查询,我可以看到有2条日期为2009年8月10日和2009年8月24日的记录:

If I run this query I can see there are 2 records with the dates 10 August 2009 and 24 August 2009:

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | 换行 | 行号

推荐答案

WHERE子句与HAVING子句的工作方式完全不同。

在应用HAVING子句标准时,在分组之前应用WHERE子句标准 分组后。尝试在第二个查询中使用与第一个查询相同的过滤方法。
WHERE clause and HAVING clause work quite differently.
WHERE clause criteria is being applied before grouping while HAVING clause criteria is being applied after grouping. Try to use in the 2nd query the same filtering method as in the 1st one.


Hi Fishval!

感谢您的帮助,但我不能似乎得到你的建议工作。当我点击Access" Totals"按钮输入Max作为日期字段,它似乎在SQL语句中将WHERE转换为HAVING,如果我尝试编辑SQL本身(并将HAVING更改为WHERE,我在查询中收到消息说语法错误(缺少运算符)表达式..."

还有什么想法吗?

再次感谢。
Hi Fishval!
Thanks for your help, but I can''t seem to get your suggestion to work. When I click on the Access "Totals" button to enter Max for the date field it seems to convert WHERE to HAVING in the SQL statement, and if I try to edit the SQL itself (and change HAVING to WHERE I get a message saying "Syntax error (missing operator) in query expression..."
Any further ideas?
Thanks again.


@janieavis


在SELECT表达式语法中,WHERE和HAVING close不在同一位置。请检查Access帮助以获得正确的语法。
@janieavis
WHERE and HAVING close are not in the same place in SELECT expression syntax. Check Access help for a proper syntax.


这篇关于最大日期似乎没有给出最大日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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