Web Development



Random Selection via Access

By l8poulse ·
I have a series of offices that are assigned numbers. We are pulling a random sample of offices each day. I've created a query that includes the Rnd function and included the TOP clause of 5 offices each time the sample is ran. I would like to have this sample be ran only once a day, but as the query would normally run, it's a new sample everytime I run it no matter how many times in one day. Is there a way to add a parameter that once the query is ran for that day, that the sample doesn't change until it's ran again the next day?

SELECT TOP 8 cb_listing.ID, bc_listing.rom, cb_listing.region, cb_listing.[bc#], cb_listing.bcname, cb_listing.[cb#], cb_listing.desc, Rnd([ID]) AS RandomValue
FROM cb_listing INNER JOIN bc_listing ON cb_listing.[bc#]=bc_listing.[bc#]

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums