Microsoft访问报告/查询 [英] Microsoft access reports/queries

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

问题描述




我有一个问题。我有一个包含几个记录的表,每个记录包含大约20列,当然还有几行。我想生成一个检查每个单元格(而不是每个记录)的查询,如果单元格为0,那么我想生成一个报告,该报告不包括单元格中的值(0),也不包括单元格的名称。我只是想在生成报告时完全忽略值和名称。它可以在VB或SQL语句中表示没问题。这可能吗?


谢谢

Hi,

I have a question. I have a table of several records each record contains about 20 columns and of course several rows. I would like to generate a query which checks each cell (not each record) and if the cell has a 0 then I want to generate a report that doest not include the value in the cell ( 0 ) nor the name of the cell. I just want to completely ignore the value and the name when generating the report. It can be in VB or a SQL statement that''s ok. Is this possible?

Thanks

推荐答案

嗯,你以后会读这篇文章,感觉有点傻。你刚刚告诉我们你不想报告的内容。你要报告什么?


如果名称是列名,如果第1行为零而第2行没有,该怎么办?然后,一个测试说包括''名称',一个测试说不包括名称。或者你的意思是一个人的名字是20行之一,你想要排除那一行的人,因为他的一列中有一个零。


它这是一个有趣的难题。告诉我们更多。


Jim
Ummm, you are going to read this post later and feel a little silly. You''ve just told us what you don''t want to report. What do you want to report?

If the name is a column name, what if row 1 has a zero and row 2 does not? Then what, one test says include the ''name'' and one test says do not include the name. Or do you mean a person''s name is one of the 20 rows and you want to exclude the person on that row because he has a zero in one of the columns.

It''s an interesting puzzle. Tell us more.

Jim


我不能说这是不可能的,因为Access真的非常灵活。这当然不简单,我无法想象它可能有意义的场景。您是否欣赏如果数据显示在单元格级别,那么每个单元格都需要在每条记录上显示列标签?因为缺少一个细胞并不意味着该列的所有细胞都必然缺失。


我建议你更多地考虑整个概念,要完全理解它是什么会涉及到。不是技术问题,而是逻辑上如何工作。


欢迎来到字节
I can''t say it''s impossible as Access can be quite flexible really. It''s certainly not simple and I can''t imagine a scenario where it might make sense. You appreciate if the data is shown at cell level then each cell would require the column label displayed on each record? Because a cell is missing does not mean that all cells for that column would necessarily also be missing.

I would suggest you give the whole concept a little more consideration, to understand fully what it would involve. Not as a technical problem, but rather as to how it would work logically.

Welcome to Bytes!


我在这里同意NeoPa。你提议的系统看起来很糟糕,除非它是针对特定情况的。我可以想到你可以使用它的情况,但我已经可以想到一个更高的替代方案正常形式

示例:宗教组织的成员是不同级别的不同委员会的成员。 0表示他们不属于该委员会,而1,2,3等表示他们在该委员会中的资历。这使得成员成为不同资历级别的多个委员会的一部分。

修复:如果您还没有为每个成员分配一个唯一的ID。创建一个包含四个字段的表:RecordID,MemberID,Committee和Seniority。 RecordID是一个简单的自动编号,可以轻松跟踪每条记录。 MemberID是前面提到的每个成员的唯一ID。委员会是您从中获取数字的字段的名称。资历是您从该字段中获取的数字的值,即3。


这使得生成报告以排除所有0更容易。因为他们甚至不会进入新的表格,以及涉及更高正常形式的众多其他好处。
I agree with NeoPa here. The system you''re proposing seems like it''s poorly formed unless it''s for an uber specific situation. I can think of a situation where you may use this, but I can already think of an alternative that''s a higher normal form.

Example: Members of a religious organization are part of different committees at different levels. 0 means that they aren''t part of that committee whereas 1, 2, 3, etc. indicates their seniority within said committee. This provides for members being part of multiple committees at different levels of seniority.

Fix: Assign each member a unique ID if you haven''t already. Create a table with four fields: RecordID, MemberID, Committee, and Seniority. RecordID is a simple autonumber to easily keep track of each record. MemberID is each member''s unique ID, mentioned earlier. Committee is the name of the field you took the number from. Seniority is the value from the field you took the number from, i.e. "3".

This makes it much easier to produce a report to exclude all "0" values since they won''t even be entered into the new table, as well as a multitude of other benefits involving a higher normal form.


这篇关于Microsoft访问报告/查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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