C
Craig
I never would have made it as far as I have without answers that I've found
in this discussion group, so I will thank you in advance for helping me with
my sticking point.
I have a query that I am using to generate a random selection of customer
records for use in an internal audit. The query that it is drawing from is
designed to select the records within the audit period and includes a
variable for the supervisor that is responsible for the associated customer
record. The query that I have so far pulls a 10% random sample of the total
records from the audit period. Where I am stuck is that I need a 10% random
sample PER SUPERVISOR for the period. The sql that I have so far is as
follows:
SELECT TOP 10 PERCENT [qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Num],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Full Name],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[SumOfAmount],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Assigned Rep]
FROM [qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE]
ORDER BY Rnd([Num]) DESC;
Any suggestions for getting to the last step will be tremendously appreciated.
in this discussion group, so I will thank you in advance for helping me with
my sticking point.
I have a query that I am using to generate a random selection of customer
records for use in an internal audit. The query that it is drawing from is
designed to select the records within the audit period and includes a
variable for the supervisor that is responsible for the associated customer
record. The query that I have so far pulls a 10% random sample of the total
records from the audit period. Where I am stuck is that I need a 10% random
sample PER SUPERVISOR for the period. The sql that I have so far is as
follows:
SELECT TOP 10 PERCENT [qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Num],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Full Name],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[SumOfAmount],
[qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE].[Assigned Rep]
FROM [qryAnnual_Audit-SUP_CUSTOMERS-UNIQUE]
ORDER BY Rnd([Num]) DESC;
Any suggestions for getting to the last step will be tremendously appreciated.