本文介绍了Funcion" ORDEM.EQ"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个叫做"RANK.EQ"的功能。或EXCEL工作表中的"ORDEM.EQ"(葡萄牙语)。你能为ACCESS创建一个等效的函数吗?
There is a funcion called "RANK.EQ" or "ORDEM.EQ"(in Portuguese) at EXCEL Worksheets. Can you create an equivalent function for ACCESS?
推荐答案
等级:DCount("*","MyTable","[MyField]>"& [MyField])+ 1
Rank: DCount("*","MyTable","[MyField]>" & [MyField])+1
或
等级:(SELECT T.Count(*)FROM [MyTable] AS T WHERE T. [Myfield]> [MyTable]。[ MyField])+ 1
Rank: (SELECT T.Count(*) FROM [MyTable] AS T WHERE T.[Myfield]>[MyTable].[MyField])+1
这是按降序排列(最大值的等级为1)。如果您想按升序排名,请更改>到<。
This is for ranking in descending order (the largest value has rank 1). If you want to rank in ascending order, change > to <.
这篇关于Funcion" ORDEM.EQ"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!