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: about finding the nth value using a QUERY - urgent

Re: about finding the nth value using a QUERY - urgent

From: Jurij Modic <jmodic_at_src.si>
Date: Thu, 25 Mar 1999 20:27:18 GMT
Message-ID: <36fa9c24.4397029@news.arnes.si>


On Thu, 25 Mar 1999 03:49:42 -0800, schong <schong_at_werple.mira.net.au> wrote:

>Try this :-
>
> select *
> from
> (
> select rownum rank, a.*
> from
> (
> select sno, marks
> from rankings
> order by marks desc
> ) a
> )
> where rank = <the nth maximum value>;
>
> Now do you homework!!

Would you care to specify the release of Oracle RDBMS you are using with the above statement? If it is anything less than 8i (aka 8.1.*) then your homework isn't done yet, because ORDER BY is not allowed inside a view in Oracle8.0 or lower. BTW, original poster specified he/she is using PO7.

> Clement

Regards,
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)



The above opinions are mine and do not represent any official standpoints of my employer Received on Thu Mar 25 1999 - 14:27:18 CST

Original text of this message

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