Message-Id: <10745.127000@fatcity.com> From: Sachin Puri Date: Thu, 18 Jan 2001 20:52:22 +0530 Subject: RE: Basic SQL question I think Zanen select A from x where 10 >=20 (select count(*) from
y where y.A > x.A) order by x.A desc; Remember to use distinct clause if you require top 10 distinct numbers = . Rgds, =3D=3D=3D=3D=3D=3D Sachin Puri Oracle Development and Administration Solutions NY Tel : +91-11-6220102 x 22 Direct : +919810373243 -----Original Message----- From: nlzanen1@ey.nl [mailto:nlzanen1@ey.nl] Sent: Thursday, January 18, 2001 7:42 PM To: Multiple recipients of list ORACLE-L Subject: Basic SQL question I think Hi All, I guess I'm braindead already (not even friday yet) I have a table with two columns column A number column B varchar2 I need to have the top ten numbers from this table (column a) The numbers are in random order. I have tried all sorts of stuff with ordering etc but to no avail. Anybody feeling lucky?? TIA Met vriendelijke groet, Jacob van Zanen (Oracle DBA) Informatie Systemen Ernst & Young Informatie & Communicatie Technologie Kantoor Gouda Tel.: 0182 575316 (intern: 923 316) Fax: 0182 536311 E-mail: nlzanen1@ey.nl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D De informatie verzonden in dit e-mailbericht is vertrouwelijk en is uitsluitend bestemd voor de geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie = aan derden is, behoudens voorafgaande schriftelijke toestemming van Ernst & Young, niet toegestaan. Ernst & Young staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden e-mailbericht, = noch voor tijdige ontvangst daarvan. Ernst & Young kan niet garanderen dat = een verzonden e-mailbericht vrij is van virussen, noch dat e-mailberichten worden overgebracht zonder inbreuk of tussenkomst van onbevoegde = derden. Indien bovenstaand e-mailbericht niet aan u is gericht, verzoeken wij u vriendelijk doch dringend het e-mailbericht te retourneren aan de = verzender en het origineel en eventuele kopie=EBn te verwijderen en te = vernietigen. Ernst & Young hanteert bij de uitoefening van haar werkzaamheden = algemene voorwaarden, waarin een beperking van aansprakelijkheid is opgenomen. = De algemene voorwaarden worden u op verzoek kosteloos toegezonden. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. You should not copy, disclose or distribute this = communication without the authority of Ernst & Young. Ernst & Young is neither liable = for the proper and complete transmission of the information contained in = this communication nor for any delay in its receipt. Ernst & Young does not guarantee that the integrity of this communication has been maintained = nor that the communication is free of viruses, interceptions or = interference. If you are not the intended recipient of this communication please = return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Ernst & Young applies general terms = and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 Please see the official ORACLE-L FAQ: http://www.orafaq.com --=20 Author:=20 INET: nlzanen1@ey.nl Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may