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: Filtered Query on nth row

Re: Filtered Query on nth row

From: <ksjune_at_sys.gsnu.ac.kr>
Date: 1998/02/10
Message-ID: <34da6392.4101338@192.9.10.110>#1/1

On Thu, 05 Feb 1998 19:29:08 -0500, Jeff Jackson <jeff_at_tatca.tc.faa.gov> wrote:

Use rownum like this...

select id
from (select rownum s, s_emp.* from s_emp) where mod(s,5) = 1;

result---
id



1
6
11
16
21

good luck...

ksjune_at_sys.gsnu.ac.kr

>Does anyone know how to do a query and filter every nth row ? Example,
>I have 100 rows returned but I am only intereseted in every other fith
>row for example.... row1, row6, row11,row16 etc.... I don't want to see
>rows 2,3,4,5,7,8,9,10 etc ... Is this possible ?
>
>Does SQL allow me to do this ? I have tried all kinds of queries,
>correlated, inner joins, sub queries and various expressions.
Received on Tue Feb 10 1998 - 00:00:00 CST

Original text of this message

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