Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL:Getting the 'Nth' records from a table..

Re: SQL:Getting the 'Nth' records from a table..

From: <narayana_ck_at_my-deja.com>
Date: Wed, 29 Sep 1999 16:39:42 GMT
Message-ID: <7stfcc$acg$1@nnrp1.deja.com>


Thanks to both Christopher and Chiu,

It did work. Regarding the question put forth my Christopher as to why would i ever want to get the records with a frequency of 'N', the answer is as follows. Usually the test engineers working with the test data would like to make sure that the application works under most test cases. It is time consuming for them to test the application against each row in the database. Rather, they randomly pick up some rows and test the appplication. In this case, to run a test on a table with more than a million rows, it is extremely time consuming. The pattern followed is to pick out certain rows from the table (based on some algorithm) and run the test against those rows. Hence the need.

thanks once again..
-ck

In article <7sod9m$1et$1_at_newsmaster.pathcom.com>,   "John Chiu" <johnc_at_relsol.com> wrote:
> Try this
>
> create table tc (k1 number);
>
> select k1 from (select b.k1, mod(rownum,5) rema from tc b) where
rema = 0;
>
> John Chiu
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Sep 29 1999 - 11:39:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US