Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problem - Retrieving first n sorted rows

Re: SQL Problem - Retrieving first n sorted rows

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 23 Oct 1998 11:13:33 GMT
Message-ID: <70poct$jnj$1@news00.btx.dtag.de>


Hi,

goto dejanews' archive and look for Jurij Modic's solution.

Ariel Kirson schrieb:
>
> Hello all,
>
> I have seen a few references to queries which retrieve
> the first N rows of a table in various FAQs on the web.
> I am however, trying to retrieve the N rows of a table
> with the smallest values of a certain column.
>
> e.g.
>
> Table : Full_Rec
> Columns : Rec_Key (key)
> Doc_Number
> Doc_Title
>
> I would like the titles of the 50 lowest Doc_Numbers
> (the table is sorted by Rec_Key, and not by Doc_Number
> of course).
>
> I am using Oracle 7.3.3. and PL/SQL 2.3.3.
>
> Thank you in advance for any solutions,
>
> Best regards,
>
> Ariel Kirson
> Ex Libris.

--

Regards

Matthias Gresz :-)

Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Fri Oct 23 1998 - 06:13:33 CDT

Original text of this message

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