- Local time
- Today, 13:18
- Joined
- Feb 28, 2001
- Messages
- 26,999
No, my reference to Timer() is what Randomize does behind the scenes. RND doesn't look at anything in its argument except the condition of its argument as negative, zero, or positive.
Let me give a shot on the above SQL codeCode:SELECT TOP 3 PERCENT Queue1.Raters_name FROM Queue1 GROUP BY Queue1.Raters_name ORDER BY First(Rnd([id]));
I think you caught me wrong here. I want 3% of each Rater_Name in the list.To make sure I interpreted this correctly you want the top 3% of the distinct names. If correct there are 13 names so top 3% returns a single name. I did not add randomize to this. You can put that in the autoexec to ensure each time you open the db, you do not redo the series.
Code:SELECT A.* FROM queue1 AS A WHERE (((A.id) IN (SELECT TOP 3 PERCENT B.ID FROM Queue1 AS b WHERE A.Raters_Name = B.Raters_Name ORDER BY Rnd([id])) )) ORDER BY A.Raters_name;
If you run the maketable query and use that in the query it seems to work. I did top 2 records for demo. I do not know why this does not work in a subquery, but have seen this before.
Just change the query to top 3 percent.
What were the results. It is 3 percent so should get 1 record each.