Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Highest Values II
Try this one
SELECT *
FROM mytable
WHERE ROWNUM <= (SELECT MAX(ROWNUM)
FROM mytable WHERE <the column which holds the values> > 0)AND <the column which holds the values> > 0 MINUS
FROM my_table WHERE <the column which holds the values> > 0)AND <the column which holds the values> > 0 ORDER BY <the column which holds the values> DESC
or you use PL/SQL
Regards
Dante
In article <7ik69k$5ci$1_at_nnrp1.deja.com>,
rpereira_at_my-deja.com wrote:
> The following solution
>
> select *
> from (select *
> from mytable
> where <wherecondition>
> order by <the column which holds the values> desc)
> where rownum <= 50
>
> to find the 50's highest values from a number column in a table
> does not work in Oracle 7.3 (that I had)
>
> Please help me to find a way to do this
>
> Thanks.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri May 28 1999 - 04:45:18 CDT
![]() |
![]() |