如何运行查询以按位置和日期按ID组排序并按日期计数 [英] How to run a query to sort by id group by location and date and count by date

查看:101
本文介绍了如何运行查询以按位置和日期按ID组排序并按日期计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是新手(访问2003年)和本论坛的新手,所以我希望我的问题能够很好地表达和适用。我总是感谢任何可以提供的建议,这个论坛已经是一个很棒的资源。


我的挑战如下。我有两张桌子


Vemco无源标签 - [Vue标签ID]和[真/假]切换按钮

Vue2database - [日期和时间],[站名]和[发送器]


第一个表使我能够选择我感兴趣的各个标签。第二个表是每次在标签上记录标签的记录。自动记录站。


到目前为止,我能够运行一个查询,让我知道在特定站点记录了多少次标记,但我需要按顺序分组这个计数访问。


所以表格可能如下:

Tag Station首次出现上次见到计数

3394 LHA12 12/1/09 12 / 2/09 4

3394 LHA14 12/5/09 12/6/09 2

3394 LHA12 12/9/09 12/10/09 10

然后告诉我标签在两个日期之间的LHA12四次然后移动到LHA14然后返回LHA12。


我希望这是有道理的如果没有,我可以根据需要添加更多信息。


再次感谢大家的帮助。


J

Hi,
I am new to both access (working in access 2003) and this forum so I hope that my questions are well phrased and suitable. I am always grateful for any advice that can be offered, this forum has already been a fantastic resource.

My challenge is as follows. I have two tables

Vemco passive tags – [Vue tag ID] and [True/False] toggle button
Vue2database – [Date and Time], [Station Name] and [Transmitter]

The first table enables me to select the individual tags I am interested in. The second table is a record of every time a tag has been recorded at an automated recording station.

So far I am able to run a query that lets me know how many times a tag has been recorded at a specific station, but I need this count grouped in order of visit.

So a table might look like:
Tag Station First seen Last seen Count
3394 LHA12 12/1/09 12/2/09 4
3394 LHA14 12/5/09 12/6/09 2
3394 LHA12 12/9/09 12/10/09 10

This then tells me that the tag was at LHA12 between the two dates four times then moved to LHA14 then back LHA12.

I hope this make sense if not I can add more info as needed.

Thanks again to you all for your help.

J

推荐答案

您可以在查询的设计窗口中设置排序属性。设置标签的排序和首先看到''升序''并在必要时清除所有其他排序。
You can set the sort properties in the design window of the query. Set the sort of both the tag and First seen to ''ascending'' and clear all other sorts if necessary.


感谢dsatino这让我在那里一半。我仍然需要能够计算每次访问期间记录标签的次数。问题,当我使用COUNT函数时,它会计算数据集中的所有记录,而不仅仅是在访问期间。我希望这是有道理的。再次感谢
Thanks dsatino this gets me half way there. I still need to be able to count the number of times a tag is recorded during each visit. the problem, i have when i use the COUNT function is that is counts all records in the dataset not just during that visit. I hope this makes sense. thanks again


尝试类似:
Try something like:
展开 | 选择 | Wrap | 行号


这篇关于如何运行查询以按位置和日期按ID组排序并按日期计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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