If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
MS Access and expression web
hy all
i am trying to generate a random query to display a random record of an access database. i tried this one : SELECT TOP 1 [id], [name], [short_review], [last_edit_date], [Photo_small] From [Books] ORDER BY RND([id]) but i get the same record all the time. i tried using the SQL command NEWID () instead of RND but ir didnt work. any suggestions ? thank - johnathan |
#2
|
|||
|
|||
MS Access and expression web
Unless properly seeded, the Rnd function will return the same values each
time. See http://www.mvps.org/access/queries/qry0011.htm at "The Access Web" for how to do what you're trying to do. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "????" wrote in message ... hy all i am trying to generate a random query to display a random record of an access database. i tried this one : SELECT TOP 1 [id], [name], [short_review], [last_edit_date], [Photo_small] From [Books] ORDER BY RND([id]) but i get the same record all the time. i tried using the SQL command NEWID () instead of RND but ir didnt work. any suggestions ? thank - johnathan |
Thread Tools | |
Display Modes | |
|
|