Last post Aug 10, 2011 06:00 AM by hans_v
Aug 09, 2011 02:10 PM|SpaceMan965|LINK
I need to select a random record from my database table, how can I do this? My query currently is:
SELECT FN, LN, RateFROM DataORDER BY Rate DESC
Aug 09, 2011 02:21 PM|satishkumar.k|LINK
please check this query
SELECT TOP 1 FN,LN,Rate FROM DATA ORDER BY Rate,NewID() desc
Aug 09, 2011 02:24 PM|SpaceMan965|LINK
It selected the first record, when I tried to rerun the query it didn't change
Aug 09, 2011 04:20 PM|SpaceMan965|LINK
I toyed with the query for a while and I finally fixed it, I had to remove "Rate," from it.
Aug 10, 2011 06:00 AM|hans_v|LINK
This question is posted in the
Access Databases and AccessDataSource Control forum. But if this works, it means that you're using SQL Server, not Access, so this post should be moved...