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: Using ROWNUM with ORDER BY clause with a CASE statement

Re: Using ROWNUM with ORDER BY clause with a CASE statement

From: Brett Cramer <bcramer0515_at_hotmail.com>
Date: 6 Nov 2003 08:32:29 -0800
Message-ID: <ddbaaaea.0311060832.49d00c4a@posting.google.com>


I hey tried your suggestion of:

select *
from (select a.*, rownum R

        from ( select * 
                 from tablename 
                order by whatever ) a
       where rownum <= MAX_ROW_YOU_WANT
      )

where R >= MIN_ROW_YOU_WANT;

..and it works! At first it was giving me grief (hence my followup post) but I think I didn't have it keyed in right.

Thanks so much! Works like a champ!

Cheers,

Brett Received on Thu Nov 06 2003 - 10:32:29 CST

Original text of this message

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