Samples Query

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

Guest

Hi,

I was wondering if there is any way of writing queries in Access to bring
back a sample or even better a random sample from certain groupings of data.
For example, Each Date may have several Sales transactions and you want to
get 5 samples from each day over the course of a week.

Any ideas anyone?

Ta.

Neil
 
Neily said:
I was wondering if there is any way of writing queries in Access to bring
back a sample or even better a random sample from certain groupings of data.
For example, Each Date may have several Sales transactions and you want to
get 5 samples from each day over the course of a week.


Don't know how useful that is, but you can add the TOP
oredicate to your query whit a random sorting:

SELECT TOP 5 *
FROM . . .
WHERE . . .
ORDER BY Rnd([somefield])
 
Back
Top