Re: Sampling

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 14 May 2002 19:43:04 GMT
Message-ID: <3CE168C6.2D264750_at_exesolutions.com>


Bricklen Anderson wrote:

> try it this way:
>
> select * from au_week_number sample (.05);
>
> hth
>
> Bricklen
>
> Randy Gebhards wrote:
> >
> > According to O'Reilly book 'Oracle SQL The Essential Reference, pages
> > 122, 123' I can add a control structure to the from clause which will
> > allow me to retrieve a random sample. However I get command not
> > properly ended error messages when following O'Reilly's book.
> > Here are the variations I havae tried.
> > 1 select *
> > 2* from au_week_number SAMPLE .05
> > SQL> /
> > from au_week_number SAMPLE .05
> > *
> > ERROR at line 2:
> > ORA-00933: SQL command not properly ended
> >
> > SQL> ED
> > Wrote file afiedt.buf
> >
> > 1 select *
> > 2* from au_week_number SAMPLE 0.05
> > SQL> /
> > from au_week_number SAMPLE 0.05
> > *
> > ERROR at line 2:
> > ORA-00933: SQL command not properly ended
> >
> > SQL> ED
> > Wrote file afiedt.buf
> >
> > 1 select *
> > 2* from au_week_number SAMPLE 5%
> > SQL> /
> > from au_week_number SAMPLE 5%
> > *
> > ERROR at line 2:
> > ORA-00933: SQL command not properly ended
> >
> > thanks, randy
>
> --
>
>
> -----------------------------
> * http://pipers.hypermart.net *
> -----------------------------

[Quoted] I believe this clause only applies to partitioned data.

Daniel Morgan Received on Tue May 14 2002 - 21:43:04 CEST

Original text of this message