robrodp
asked on
random record selection asp and access
I want to select a random record with:
select top 1 * from llamadas order by newid()
With my MS SQL database it works fine but it gives an error with mdb files
select top 1 * from llamadas order by newid()
With my MS SQL database it works fine but it gives an error with mdb files
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...
Randomize
RndKey = Int (1000*Rnd)+1
SQLstr = "SELECT Top 1 Rnd(" & -1 * RndKey & " * id), " & _
"llamadas.* " & _
"FROM llamadas "
"Order By 1 "
....