消除选择查询重复项 [英] Eliminate Select Query Duplicates

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

问题描述

我正在构建一个Access数据库,用于评分比赛,并且在处理并列分数时遇到问题。目前,我有一个简单的查询,它提取包含25个最高分数的记录(使用Top Value函数)。但是,这个查询
无法处理基本上排在第25位的关系。我认为这是因为没有规定在两个或三个记录之间进行选择,因此查询只返回所有记录,从而得到26或27条记录的列表,而不是25.



历史上,这是通过Excel完成的,无论谁输入分数,只需选择一个进入前25名。因此,我需要某种功能或代码隔离第25个位置的平局。我一直在
数据库的其他地方使用Rnd()函数,所以我可以处理那部分;我只是不知道如何隔离记录。任何帮助将不胜感激。

解决方案


只是一个想法,你可以使用一个函数为结果记录分配一个序号,然后使用另一个查询拉出前25个。


希望它有帮助......


I am constructing an Access database for scoring a competition and am having a problem dealing with tied scores. Currently, I have a simple query that pulls the records containing the 25 highest scores (using the Top Value function). However, this query is unable to deal with ties for what is essentially 25th place. I figure this is because there is no provision for choosing between the two or three records, so the query simply returns them all, resulting in a list of 26 or 27 records, rather than 25.

Historically, this has been done via Excel, and whoever was entering scores would simply choose one to move to the top 25. As such, I need some kind of function or code to isolate a tie for the 25th spot. I have been using an Rnd() function elsewhere in the database, so I can handle that part; I just don't know how to isolate records. Any help would be appreciated.

解决方案

Hi,

Just a thought, you might use a function to assign a sequential number to the resulting records and then use another query to pull the first 25.

Hope it helps...


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

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