Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Randomly pick x people for cleaning duties. 1

Status
Not open for further replies.

2manyerrors

Programmer
May 14, 2009
36
US
Hi all,

I've looked for random in the forums but can't seem to find anything related to what i'm doing. Hope someone can help me here.

My db has two tables. employee_table and employee_picked_table.

Ok, I have a small db that holds employees names. what I am trying to do is run a query or something where I can type in a number, let's say 5 and this will pull 5 random names from my employee table into a report to print. But, at the same time I would like the process to list the "randomly picked names" into a second table so I can print this if needed too. When the "randomly picked names" are listed in the second table, the dates and time stamp should be added too. This is so I can later run a report and list all the people who have been picked for cleaning duties by months.

The logic behind the db is pick random employees for clean up duties. I hope someone can help me solve this problem. Thank you a head of time!

 

You still did not answer MajP's question:
So what exactly are the rules to draw? Can those people who get picked in January be able to get picked in February? Or will you only draw from those who have not yet been picked?
It would benice to know the answer..... :)

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top