I need to retrive a recordset in a random order, the table is going to be used for a banner display. So I want to select a random record, or at least order the recordset in a random order.
Also it can only be done with sql code, cant do it with asp or similar, and the same code should work in Access and SQL server.....![]()
I have been trying with something like this:
SELECT FieldID, FieldNAME
FROM Table
ORDER BY Rnd(FieldID)
FieldID would be a number/integer.
Would this acctually give me a random order, have tested some, but arent 100% sure that its "random".
Also, could one throw in some "weight" into the random?, like give one row in the table some more "possible hits"?




Reply With Quote