Sampling

From: Randy Gebhards <Randy_Gebhards_at_kdor.state.ks.us>
Date: 14 May 2002 10:31:56 -0700
Message-ID: <5b5a5026.0205140931.2254dae1_at_posting.google.com>



[Quoted] 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 Received on Tue May 14 2002 - 19:31:56 CEST

Original text of this message