最近的日期记录,也许我没有正确看到它。 [英] Most Recent Dated Record, perhaps I am not seeing it correctly.

查看:45
本文介绍了最近的日期记录,也许我没有正确看到它。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家,

我有以下情况:


表1:RecordID RecordDate ...


我想在查询中向我显示这个RecordID,只有最新的

RecordDate和info。我知道我可以使用Max命令,但我不熟悉它背后的概念,如何使用它。即如果我在查询列中选择了

Max(RecordDate),它仍会显示所有记录。如果我将
与RecordID相结合,同样......我该怎么做?


提前致谢,

Perry

Experts,
I have the following scenario:

Table1: RecordID RecordDate ...

I want in a query to show me within this RecordID, only the latest
RecordDate and info. I know I can use the Max command but am not
familiar with the concept behind it, how to use it. i.e. if I pick
Max(RecordDate) in the query column, it still shows all records. If I
combine it with RecordID, same... what should I have done?

Thanks in advance,
Perry

推荐答案

在QueryBuilder窗口中,下拉想要查看的字段。点击

记录日期并设置按降序排序。然后右键单击上面的

区域,但不要在表格或连接线上,并从查询属性中选择

Top 1.


Larry Linson

Microsoft Access MVP

< pe ****** @ yahoo.com>在消息中写道

news:11 ********************** @ o13g2000cwo.googlegr oups.com ...
In the QueryBuilder window, pull down the Fields you want to see. Click on
Record Date and set Sort in Descending order. Then right-click in the upper
area, but not over a table or a join lines, and from Query Properties Select
Top 1.

Larry Linson
Microsoft Access MVP
<pe******@yahoo.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
专家,
我有以下场景:

表1:RecordID RecordDate ...

我想在查询中向我显示此RecordID ,只有最新的RecordDate和信息。我知道我可以使用Max命令,但我不熟悉它背后的概念,如何使用它。即如果我在查询列中选择了Max(RecordDate),它仍会显示所有记录。如果我将它与RecordID相结合,同样......我该怎么做?

提前致谢,
Perry
Experts,
I have the following scenario:

Table1: RecordID RecordDate ...

I want in a query to show me within this RecordID, only the latest
RecordDate and info. I know I can use the Max command but am not
familiar with the concept behind it, how to use it. i.e. if I pick
Max(RecordDate) in the query column, it still shows all records. If I
combine it with RecordID, same... what should I have done?

Thanks in advance,
Perry



这只会显示1条记录吗?我想要的是在同一个记录#

(在同一张表中),有多个日期,我只想显示

最新日期记录。因此,我可能会:


ID日期

Rc1:101 09/25/05(不包括Rc1 9/1/05)

Rc2:105 10/22/05(不包括Rc2 09/22/05,08/14/04 ......)

Rc3:111 04/25/04 ......


我希望这更清楚。


佩里

Would this show only 1 record? What I want is within the same Record#
(in the same table), there are multiple dates, I want only to show
latest date record. Therefore, I might have:

ID Date
Rc1: 101 09/25/05 (excluded Rc1 9/1/05)
Rc2: 105 10/22/05 (excluded Rc2 09/22/05, 08/14/04...)
Rc3: 111 04/25/04...

I hope this is clearer.

Perry


拉里说:
在QueryBuilder窗口中,下拉想要查看的字段>> ;.点击
记录日期并设置按降序排序。 >>然后在上部
区域右键单击,但不在表格或连接线上,并从>>右键单击。查询属性选择
Top 1.



Perrry说:

这只会显示1条记录吗?我想要的是>>在同一个记录中#
In the QueryBuilder window, pull down the Fields >>you want to see. Click on
Record Date and set Sort in Descending order. >>Then right-click in the upper
area, but not over a table or a join lines, and from >> Query Properties Select
Top 1.

Perrry said:
Would this show only 1 record? What I want is >> within the same Record#




Perry,

它应该只显示1条记录,因为你选择了' '前1''

记录......意味着只显示第1条记录。这将工作

,因为你按日期排序DESC排序(最近的日期

将是排序中的第一个记录)


Max函数在Group By或Totals查询中效果更好



Perry,
It should only show 1 record, because you''re selecting the ''Top 1''
records... meaning only the 1st record will be shown. This will work
because you''re sorting in DESC ordering by the date (most recent date
will be the 1st record in the sort)

The Max function works better in a Group By or Totals query


这篇关于最近的日期记录,也许我没有正确看到它。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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