mgeloi2
28th March 2011, 13:46
For pallet inspection I need to select each day randomly 10 pallets of same item entered in the warehouse.

I have [table A] with item, date, time, pallet number and quantity.
The goal is to select each day a different item to be inspected (but 10 different pallets of same item).

I’m using the “random()” function to generate a specific time but the results are not as expected.

Can anyone suggest an easy way to accomplish it?

günther
29th March 2011, 10:41
Hi,

I would declare an array of say 1000 elements and then select all possible records and store the time there (and a counter). After this operation, you know how much transfers were on that day, and you can pick 10 of them by using random().

Günther