将Rank列添加到报表中 [英] Adding a Rank column to a report

查看:74
本文介绍了将Rank列添加到报表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Access''02,Windows XP专业版SP2

我有一个报告,其中包含按名称排序的数据,并且已被要求添加一个输出排名的字段基于数字(货币)字段。


现在的报告结构示例(为间隔目的添加破折号)


名称 - ---------分数

----------------------------

ABC ------------------ 10

BCD ----------------- -25

CDE -------------------- 5


示例报告需要的结构


排名------姓名--------------分数

--------- ---------------------------------

--- 2 ----- ---- ABC ------------------- 10

--- 1 --------- BCD --- ---------------- 25

--- 3 --------- CDE ----------- -------- 5

我几周前开始冒险进入Access并且没有SQL知识。我试图进行查询以提取数据,求助和数字,但我无法理解一些命令。我不知道是否可以在一个自动计算排名的查询中添加一个字段(基于按分数字段排序的查询)

解决方案

你打算按报告排名吗?


不,我不是。报告仍将按名称继续排序。但我需要将记录排序为好像按分数排序。


有没有办法用Access功能完成这项工作,或者我是否必须尽快学习SQL?

Using Access ''02, Windows XP Pro SP2

I have a Report that Contains data that is sorted by name and have been asked to add a field that would output a rank based on a numerical (currency) field.

Example Report structure as it is now (dashes added for spacing purposes)

Name-----------Score
----------------------------
ABC------------------10
BCD------------------25
CDE--------------------5

Example Report Structure needed

Rank------Name--------------Score
------------------------------------------
---2---------ABC-------------------10
---1---------BCD-------------------25
---3---------CDE-------------------5

I just started my adventure into Access a few weeks ago and have no SQL knowledge. I have attempted to make a query to pull data, resort, and number, but I have been unable to get my head around some of the comcepts. I do not know if it is possible to add a field into a query that would auto count a rank (based on the query being sorted by the Score field)

解决方案

Are you going to sort by rank on the report?


No I am not. The report will still continue to be sorted by name. But I need the records ranked as if they were sorted by score.


Is there any way to do this at all with Access functions, or do I have to lears SQL soon?


这篇关于将Rank列添加到报表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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