473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Random Item query selection

84
I have a real head scratcher here. Our Audit department wants to view records that our operators update in our customer account table. They want us to randomly pull records from the table. Is there a query method that will pull records randomly?
Jul 26 '07 #1
3 1632
missinglinq
3,532 Expert 2GB
You have inadvertently posted your question in the Access Articles section. I'm moving it over to the Access Forum.

Linq ;0)>
Jul 26 '07 #2
missinglinq
3,532 Expert 2GB
This will pull 10 random records, but, of course, you can easily modify that:
Expand|Select|Wrap|Line Numbers
  1. SELECT TOP 10 Rnd(Len([PrimaryKeyField])) AS Expr1,YourTable.PrimaryKeyField,YourTable.Field1, YourTable.Field2,YourTable.Field3
  2. FROMYourTable
  3. ORDER BY Rnd(Len([PrimaryKeyField])) DESC;
  4.  
Good Luck!

Linq ;0)>
Jul 26 '07 #3
sesling
84
This will pull 10 random records, but, of course, you can easily modify that:
Expand|Select|Wrap|Line Numbers
  1. SELECT TOP 10 Rnd(Len([PrimaryKeyField])) AS Expr1,YourTable.PrimaryKeyField,YourTable.Field1, YourTable.Field2,YourTable.Field3
  2. FROMYourTable
  3. ORDER BY Rnd(Len([PrimaryKeyField])) DESC;
  4.  
Good Luck!

Linq ;0)>
Thanks for moving the message and the reply. It worked GREAT!!!
Jul 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Keith Griffiths | last post by:
I'm trying to do a search under a set criteria followed by a selection of random entries meeting this criteria. But I don't seem to be able to achieve this. The idea being to search on say...
4
by: Jesse Noller | last post by:
Hello - I'm probably missing something here, but I have a problem where I am populating a list of lists like this: list1 = list2 = list3 = main_list =
2
by: IceCube | last post by:
Hello, I would like to select/filter at random 30 records out of an Access-table of 1500 records. I know the option "Top" which gives me the possibility to see the 30 first records of the table...
2
by: VB Programmer | last post by:
I am interested to hear your suggestions on this... I have a table full of survey questions. The questions are individually classified as priority 1, 2 or 3. (Priority 1 means the question...
8
by: Kari Lavikka | last post by:
Hi! I have to select a random row from a table where primary key isn't continuous (some rows have been deleted). Postgres just seems to do something strange with my method. -- -- Use the...
5
by: jordi | last post by:
I need the random.sample functionality where the population grows up to long int items. Do you know how could I get this same functionality in another way? thanks in advance. Jordi
19
by: Boris Borcic | last post by:
does x.sort(cmp = lambda x,y : cmp(random.random(),0.5)) pick a random shuffle of x with uniform distribution ? Intuitively, assuming list.sort() does a minimal number of comparisons to ...
13
by: Bruza | last post by:
I need to implement a "random selection" algorithm which takes a list of as input. Each of the (obj, prob) represents how likely an object, "obj", should be selected based on its probability of...
3
by: Manuel Ebert | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear list, who's got aesthetic advice for the following problem? I've got some joint probabilities of two distinct events Pr(X=x, Y=y), stored...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.