Re: Random sample
Date: 1995/05/02
Message-ID: <Pine.SUN.3.91.950502114347.6617A-100000_at_seatimes>#1/1
On 28 Apr 1995, Michael Nolan wrote:
> dericks_at_merle.acns.nwu.edu (Daniel Erickson) writes:
> >Is there an easy way to select a random sample of rows from a table? I.E.,
> >give a random sample of rows that is 5% percent of the table size?
>
> Prior to 7.1, about your only options are either to add a 'random' column
> to your table, populate it using a random generator written in PL/SQL and
One little trick that was taught in Prob and Stats (4th year college math) relates the middle two digits of the phone number (last four digit portion) to a random set of numbers. Since these two digits range from 00 to 99, they provide a means of selecting rows at about the 1% granularity. It's not precise, but then, neither are random numbers! ;-)
--Steve
PS It does help to have the phone number available though.
+----------------------------------------------------+ | Steve Butler Voice: 206-464-2998 | | The Seattle Times Fax: 206-382-8898 | | PO Box 70 Internet: sbut-is_at_seatimes.com | | Seattle, WA 98111 Packet: KG7JE_at_N6EQZ.WA | +----------------------------------------------------+All standard and non-standard disclaimers apply. All other sources are annonymous. Received on Tue May 02 1995 - 00:00:00 CEST