I have a real head scratcher here. Our Audit department wants to view records that our operators update in our customer account table. They want us to randomly pull records from the table. Is there a query method that will pull records randomly?
Random Item query selection
Collapse
X
-
You have inadvertently posted your question in the Access Articles section. I'm moving it over to the Access Forum.
Linq ;0)> -
This will pull 10 random records, but, of course, you can easily modify that:
[CODE=sql]SELECT TOP 10 Rnd(Len([PrimaryKeyField])) AS Expr1,YourTable .PrimaryKeyFiel d,YourTable.Fie ld1, YourTable.Field 2,YourTable.Fie ld3
FROMYourTable
ORDER BY Rnd(Len([PrimaryKeyField])) DESC;
[/CODE]Good Luck!
Linq ;0)>Comment
-
Thanks for moving the message and the reply. It worked GREAT!!!Originally posted by missinglinqThis will pull 10 random records, but, of course, you can easily modify that:
[CODE=sql]SELECT TOP 10 Rnd(Len([PrimaryKeyField])) AS Expr1,YourTable .PrimaryKeyFiel d,YourTable.Fie ld1, YourTable.Field 2,YourTable.Fie ld3
FROMYourTable
ORDER BY Rnd(Len([PrimaryKeyField])) DESC;
[/CODE]Good Luck!
Linq ;0)>Comment
Comment