Re: Choose a random record from a list of duplicates

2007-01-09 Thread Scott Haneda
> zv Green wrote: >> Hello all, >> >> What I want to do is select all the records from the table but where >> there >> are duplicate entries (based on say, the surname and postcode fields) >> pick a random record and then ignore the rest. > > If you want to pick a random record, you can do ORDER

Re: Choose a random record from a list of duplicates

2007-01-09 Thread Chris White
zv Green wrote: Hello all, What I want to do is select all the records from the table but where there are duplicate entries (based on say, the surname and postcode fields) pick a random record and then ignore the rest. If you want to pick a random record, you can do ORDER BY RANDOM LIMIT 1

Choose a random record from a list of duplicates

2007-01-09 Thread Trev Green
Hello all, I'm having real problems trying to work this one out. Basically I have a big table full of names, addresses and other such information. What I want to do is select all the records from the table but where there are duplicate entries (based on say, the surname and postcode fields) pick