Forgive me if I am wrong, but does your suggestion not
require that all the IDs be sequential. If, for instance
you started with 200 records, and deleted every other one,
you would be left with 100 even numbered records. Using
your logic, the count would be 100 and the random_number
might be odd (i.e. 33). Since there is no record ID 33
(remember all odd records were deleted), the query would
return nothing.
Hi Jamie,>select count(*) from tbl, sort of thing
randomize
count = {count varable from select (*)}
random_number=int(rnd*count)+1
select from tbl where id = random_number
-----Original Message-----
is it ASP ???
you could do something like
something like this will do it
Graham
"Jamie Fryatt" <ja**********@btconnect.com> wrote in
message news:bq**********@titan.btinternet.com...
Hi all, im a little bit new to all this so i you could
help me a little i would be greatful.
How do i select a completly random record from a
database?
sql = select (random) from tbl, sort of thing.
Thanks for any help you can give
Jamie