Re: Randomly ordered select. How is it done?
Posted in 1998
David Barnish wrote: > > Hello, > I want to select a group of records from a table but have them > returned to me in a random order every time my program performs this > particular select. Is there a way in SQL to do this? I can come up with > ways to do it but these methods will slow down the system. Send me email > if you have any suggestions. > Thanks > dbarnish@onel.com > > -- > Please remove the small bird from my > name to email me. There's a few randomize functions in the IIUG archives. http://www.iiug.org/ It will be slow. If you have a serial column with no gaps in the sequence you could generate the random numbers in an application and select them from your serial column. You could also select the data into a statistics package like SPSS or SAS and do the random selection there. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/