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: SQL problem. HELP!

Re: SQL problem. HELP!

From: Sergey V. Fedorishin <sfedor01_at_grads.fiu.edu>
Date: 1997/06/23
Message-ID: <5om6vd$ghu@isis.fiu.edu>#1/1

my $0.02: take closer look at >= and < signs in this query, you're getting top NN+1.

Arnold Jones (moores_at_sequent.com) wrote:
: Jerry,
: The traditional way to find the highest NN rows in a table is:
 

: select col1,col2 from tab1 t where NN >= (select count(*) from tab1 tt
: where t.col2 < tt.col2);
 

: Regards,
: AJ.
 

: Jerry Glass wrote:
: >
: > I am lookin for a way to solve a problem. I need to find the highest
: > values in a list and only return those values (i.e., find the three
: > highest values and only return those three rows)

--
-Sergey.
Received on Mon Jun 23 1997 - 00:00:00 CDT

Original text of this message

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