From the course: Access 2016: Queries
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Pull random records from the database
From the course: Access 2016: Queries
Pull random records from the database
- [Voiceover] Occasionally, you'll wanna do a spot check or perform an audit on the data that's in your database. And while you don't want or don't need to review every single record, it would make sense to review a random sampling of the information that you're storing. Let's suppose you needed to do a customer survey of 50 customers, and you wanted to be sure to get a random customer sampling to call so you don't introduce bias into the survey results. Here's how you can have Access pull up the records for you. We'll start with a new query in Design view, and I'll add in my Customers table. Then we're gonna choose the CustomerID, FirstName, LastName, and Phone number fields. In the fifth column, I'm gonna right-click and choose Build to go to the Expression Builder. We'll go into our Functions, into the functions built into Access, then we'll come down to the Math category here. There's a function called Random, or Rnd, and if I take a look at the syntax down here, we can see that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Pull random records from the database2m 46s
-
(Locked)
Return records above or below the average4m 8s
-
(Locked)
Process a column of values with domain functions5m 43s
-
(Locked)
Challenge: Identify the highest and lowest pricing markup25s
-
(Locked)
Solution: Identify the highest and lowest pricing markup4m 14s
-
(Locked)
-