Re: Table sampling question
From: MLee417633 <mlee417633_at_aol.com>
Date: 28 Feb 1995 10:16:31 -0500
Message-ID: <3iveof$o9j_at_newsbf02.news.aol.com>
Date: 28 Feb 1995 10:16:31 -0500
Message-ID: <3iveof$o9j_at_newsbf02.news.aol.com>
In response to using only sql to return nth rows from a paricular table:
create view tablea_vw as select *, rownum rn from tablea; select * from tablea_vw where mod(rn,100) = 0;
This will return every 100th row from tablea. As far as I know, you cannot do this directly from one sql statement. The rownum select item in the create view clause is a SQL*Plus pseudo column. Refer to the SQL*Plus manual for a description if you are not familiar.
Hope this helps.
Mike Lee leemic_at_versar.com
Received on Tue Feb 28 1995 - 16:16:31 CET