Hi,
Thomas Kyte recently described how to do this using 8i. If you don't
have 8i you might want to consider a procedure that given a random number
will return an Oracle row-id that can be used to select a row from the
table. The code that calls the procedure should store the row-ids in a
table as a unique index in order to prevent duplicates from being retrieved.
regards
Jerry Gitomer
Ulrich Kaemmerer wrote in message <7lj9ho$pqc$1_at_newsread.do.de.uu.net>...
>Hi all,
>
>is there a possibillity to retrieve a numer of records randomally from a
>table ?
>I have a table with 300000 records an want to retrieve a user-defined
>percentage
>of random selected records.
>I know that i can use a column, update the whole table with distinct
>random-numbers
>and than retrieve all records < x.
>
>But i think there should be another solution without updating a column.
>
>Maybe something with random rowid´s ?
>
>Thanks in advance
>U.Kaemmerer
>
>
>++++++++++++++++++++++++++++++++++
>Ulrich Kämmerer
>Creon IT Consult GmbH
>
>Tel : +49 69 609004-11
>Fax : +49 69 609004-20
>Mobil : 0171 / 2837367
>EMail : U.Kaemmerer_at_Creon-IT.com
>++++++++++++++++++++++++++++++++++
>
>
>
>
>
>
Received on Sun Jul 04 1999 - 00:41:55 CDT