使用多个标准审核抽样 - 访问查询 [英] Audit sampling with multiple criterias- Access Query

查看:51
本文介绍了使用多个标准审核抽样 - 访问查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我已经坚持了一段时间了。


我有2张桌子,

表1,其中的数据包含名称,doc_No,Amount,entity等字段。


秒,表2,我已经按照下面提到的每个实体按列定义标准。

我的查询应该引用条件表并从实体字段匹配的表中选择样本


1)我需要选择TOP 6%(或指定在标准表字段Criteria1_Per中,样本来自表格,其中金额字段是> 6000(或在条件表字段Criteria1_Range中指定)

2)接下来我需要从表中选择3%(或在条件表字段Criteria2_Per中指定)样本提交的金额在3000到6000之间(或在标准表字段Criteria1_Range中指定)和

3)最后我需要选择1%(或在条件表字段中指定的) Criteria3_Per")样本,其中amount字段是< 3000(或在标准表字段Criteria1_Range中指定)。

此处的抓点是在1,2,3点选择的总样本应为10%(或在标准中指定)表格字段Criteria4_Per表格中的总计数。


请帮我这个

解决方案

nnlewis ,


欢迎来到字节!


首先,当我们看不到你的任何一个时,我们很难发现你表信息。我们不是要求您将数据库发布到此站点,但我们要求您提供有关您的表的更多信息。


关于手头的任务,它也有帮助您向我们提供了一些样本数据以及预期结果。如果您只是对一条记录执行一次计算并将其显示在一个表单中,这是一回事,但是期望多次迭代,这是另一回事。基本上,除非我们更了解你想要完成的事情,否则我们无法帮助你。


最后,


此处的捕获点是在点1,2,3中选择的总样本应该是表中总计数的10%(或在标准表字段Criteria4_Per中指定的)。



你关心的部分是一个基本的数学问题,根据任何算术方法都没有加起来。例如,假设您的第一个样本是9000.其中10%是900.这意味着您希望所有样本(6%,3%和1%)加起来达到10%?这种情况永远不会发生,因为6000%的3%样本是180,而3000%的1%样本是30.当你添加9000的6%样本(540)时,你的总和只有750.所以,我我不确定10%的要求来自哪里。


如果我们从你那里获得更多信息,我们很乐意尝试和hepp。但在这一点上,我们只会猜测如何处理这个问题。


嗨twinnyfo


对不起,我不能之前看到附件选项,但经过一些探索,我现在可以找到。请看看





附加文件
Test_Database_1.zip (92.8 KB,24 views)


请不要在论坛上发布你的数据库,除非我们特别要求你。


请更详细地解释你的关注并描述你想要完成的事情

Hi Guys, I have stuck with this problem for a while now.

I have 2 tables,
Table 1 with data which contain filed like name, doc_No, Amount, entity.

second , Table 2, I have with criteria''s defined in column-wise for each entity as mentioned below.
my query should refer criteria table and slect the samples from table where Entity field is matching

1) I need to select TOP 6%(or as specified in the criteria table field "Criteria1_Per") samples from table where amount field is > 6000 (or as specified in the criteria table field "Criteria1_Range")
2) next I need to select 3 % (or as specified in the criteria table field "Criteria2_Per") samples from table where amount filed is between 3000 to 6000 (or as specified in the criteria table field "Criteria1_Range") and
3) finally I need to select 1% (or as specified in the criteria table field "Criteria3_Per") sample where amount field is < 3000 (or as specified in the criteria table field "Criteria1_Range").
The catch point is here total sample selected in point 1,2,3 should be 10% (or as specified in the criteria table field "Criteria4_Per") of the overall count in the table.

please help me on this

解决方案

nnlewis,

Welcome to Bytes!

First, it is very difficult for us to hlep you when we can''t see any of your table information. We are not asking you to post your DB to this site, but we do ask that you provide a bit more about your tables.

Concerning the task at hand, it is also helpful if you provide us some sample data and what the expected results should be. If you are just performing calculations on one record once and displaying it in a form, that is one thing, but to expect multiple iterations, it is another. Basically, we can''t help you unless we know more about what you are trying to accomplish.

Finally,

The catch point is here total sample selected in point 1,2,3 should be 10% (or as specified in the criteria table field "Criteria4_Per") of the overall count in the table.

Part of your concern is a basic math problem that doesn''t add up based on any means of arithmetic. For example, let''s say your first sample is 9000. 10% of that is 900. This means that you want all of your samples (6%, 3% and 1%) to add up to 10%? This will never happen, as a 3% sample of 6000 is 180 and a 1% sample of 3000 is 30. When you add a 6% sample of your 9000 (which is 540), your sum total is only 750. So, I''m not sure where the 10% requirement comes from.

We''ll be glad to try and hepp if we get some more information from you. But at this point, we would only be guessing at how to approach this.


Hi twinnyfo

sorry for that, I couldn''t see attachment option earlier, but with some explore, I could find now. please have a look

Attached Files
Test_Database_1.zip (92.8 KB, 24 views)


Please don''t post your DB on the forum unless we specifically ask you to.

Please explain your concern in greater detail and describe what it is you want to accomplish.


这篇关于使用多个标准审核抽样 - 访问查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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