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: Angelo Cavallaro <angelo.cavallaro_at_pcm.bosch.de>
Date: 1998/02/06
Message-ID: <34DAD258.6E5F@pcm.bosch.de>#1/1

Hola.

This is one solution:

select column_a, column_b
  from your_table a
 where a.rowid in (select decode(mod(rownum,5),1,b.rowid,NULL)

                     from your_table b)

I would place further WHERE-Conditions in the SUB-Select.

Greez,
Angelo.

-- 

-----------------------------------------------------------------
Angelo Cavallaro / / / \ TECTUM Beratungsgesellschaft ORACLE-SW-Berater / / / \ für Informationsverarbeitung ancavall.NOSPAM / / /-------\ Tel: 0711/99073-10 @aol.com /__/__/_________\ Fax: 0711/99073-99
-----------------------------------------------------------------
Visit the Home of the Green Ribbon Campaign: http://www.ponce.oisoft.com/
-----------------------------------------------------------------
Received on Fri Feb 06 1998 - 00:00:00 CST

Original text of this message

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