如何仅计算字段的DISTINCT值 [英] How do I Count Only DISTINCT Values of a Field

查看:105
本文介绍了如何仅计算字段的DISTINCT值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有一个访问2000数据库,并被要求对其中的数据进行一些报告。


我必须做的一个报告如下:

Hi I have an access 2000 database and was asked to do some reporting with the data in it.

There is one report I have to do would look like this :

展开 | 选择 | Wrap | 行号

推荐答案

您甚至没有问过任何问题,并且几乎没有告诉我们您的目标。我怀疑这篇文章会被我们尊敬的版主删除,除非你告诉我们你想要做什么。


Pat
You have not even asked a question, and have told us almost nothing about your objective. I suspect that this post will get deleted by one of our esteemed moderators unless you tell us exactly what you are trying to do.

Pat


我正在尝试找到一种在一个查询中进行多次计数(不同col)的正确方法。因为我们不能在Access中做Count(Distinct col)我不想做多个查询。


看代码,第一个SQL查询是查询我想要实现。第二个SQL查询是我不想做的查询
I''m trying to find a correct way to do multiple count(distinct col) in one query. Since we can''t do Count(Distinct col) in Access I don''t want to do multiple query.

Look at the code, the first SQL query is the query I want to achieve. The second SQL query is the query I would like not to do


虽然没有以这种方式使用DISTINCT关键字。 DISTINCT是在记录级别而不是单个列级别应用的东西:

The DISTINCT keyword is not used in that manner though. DISTINCT is something that is applied at the record level, not individual column level:

展开 | 选择 | Wrap | 行号


这篇关于如何仅计算字段的DISTINCT值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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