Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

filter out randomly?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sally t - 24 Nov 2005 12:50 GMT
Can I ask Access to filter out say, 100, randomly chosen records from a large
list? ie no criteria but just specify the number of random records I want?

Thanks
Sally T

PS If not - does anyone know how to do this in Excel?
Marshall Barton - 24 Nov 2005 16:22 GMT
>Can I ask Access to filter out say, 100, randomly chosen records from a large
>list? ie no criteria but just specify the number of random records I want?

SELECT TOP 100 keyfield, posfield, fieldA, . . .
FROM table
ORDER BY Rnd(posfield)

Don't forget to use the Randomize statement somewhere before
running the query.

The field name used in the Rnd function can be any field
that contains only positive numbers, no zeros, no negatives
and no Nulls.

Signature

Marsh
MVP [MS Access]

sally t - 24 Nov 2005 21:04 GMT
many thanks!

sally

> >Can I ask Access to filter out say, 100, randomly chosen records from a large
> >list? ie no criteria but just specify the number of random records I want?
[quoted text clipped - 9 lines]
> that contains only positive numbers, no zeros, no negatives
> and no Nulls.
KARL DEWEY - 25 Nov 2005 05:39 GMT
Excel can by adding another column and filling with number generated using
the random function. Soet on the random number column and then select the
first 100.

> Can I ask Access to filter out say, 100, randomly chosen records from a large
> list? ie no criteria but just specify the number of random records I want?
[quoted text clipped - 3 lines]
>
> PS If not - does anyone know how to do this in Excel?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.