Re: Sampling

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 15 May 2002 11:55:54 +0100
Message-ID: <3ce23ebb$0$8510$ed9e5944_at_reading.news.pipex.net>


[Quoted] [Quoted] "Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message news:3CE168C6.2D264750_at_exesolutions.com...
> Bricklen Anderson wrote:
>
> > try it this way:
> >
> > select * from au_week_number sample (.05);
<snip>

> I believe this clause only applies to partitioned data.

Nope works fine on ordinary tables. Note the banner shows this to be std edition and no partitioning.

SQL> select * from v$version;

BANNER



Oracle8i Release 8.1.7.3.0 - Production
PL/SQL Release 8.1.7.3.0 - Production
CORE 8.1.7.2.1 Production
TNS for 32-bit Windows: Version 8.1.7.3.0 - Production NLSRTL Version 3.4.1.0.0 - Production

SQL> select last_update from rm_atsinvtrans sample (0.005);

LAST_UPDA


07-JAN-00
06-MAR-00
06-APR-00
29-MAR-01
05-JUL-00
05-JUL-00
06-OCT-00
31-JAN-01
05-JAN-01
28-FEB-01
29-MAY-01

LAST_UPDA


29-MAY-01
02-JUL-01
02-JUL-01
02-JUL-01
02-JUL-01
28-AUG-01
28-AUG-01
01-OCT-01
28-JAN-02
26-NOV-01
03-DEC-01

LAST_UPDA


21-JAN-02
18-FEB-02
18-FEB-02
25-FEB-02
25-MAR-02
02-APR-02
02-APR-02

29 rows selected.

SQL>

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Wed May 15 2002 - 12:55:54 CEST

Original text of this message