Random Selection of Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a need to generate a report showing a 10% Random selection of
records. There will be an initial criteria of a date, then I need to have a
random selection of 10% of the selected records displayed on the form.
Is the 10% part achievable and the random part also achievable, if they are
how would I go about this.


many Thanks

Richard
 
SELECT TOP 10 PERCENT asa.*
FROM asa
WHERE randomizer()=0
ORDER BY Rnd(IsNull([asa].[AsaID])*0+1);

Put in the proper table name for "asa".
For AsaID put in a field name for an Autonumber field.
 
Hi Jerry
The randomizer() function need to be defined

Look at this link:

http://www.mvps.org/access/queries/qry0011.htm

--
Good Luck
BS"D


Jerry Whittle said:
SELECT TOP 10 PERCENT asa.*
FROM asa
WHERE randomizer()=0
ORDER BY Rnd(IsNull([asa].[AsaID])*0+1);

Put in the proper table name for "asa".
For AsaID put in a field name for an Autonumber field.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


richard said:
Hi

I have a need to generate a report showing a 10% Random selection of
records. There will be an initial criteria of a date, then I need to have a
random selection of 10% of the selected records displayed on the form.
Is the 10% part achievable and the random part also achievable, if they are
how would I go about this.

many Thanks

Richard
 
Doh! Thanks for keeping me straight!
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Ofer Cohen said:
Hi Jerry
The randomizer() function need to be defined

Look at this link:

http://www.mvps.org/access/queries/qry0011.htm

--
Good Luck
BS"D


Jerry Whittle said:
SELECT TOP 10 PERCENT asa.*
FROM asa
WHERE randomizer()=0
ORDER BY Rnd(IsNull([asa].[AsaID])*0+1);

Put in the proper table name for "asa".
For AsaID put in a field name for an Autonumber field.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


richard said:
Hi

I have a need to generate a report showing a 10% Random selection of
records. There will be an initial criteria of a date, then I need to have a
random selection of 10% of the selected records displayed on the form.
Is the 10% part achievable and the random part also achievable, if they are
how would I go about this.

many Thanks

Richard
 
Back
Top