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: query problem help needed

Re: query problem help needed

From: <brendan_o'brien_at_wrightexpress.com>
Date: Thu, 30 Apr 1998 13:13:11 -0600
Message-ID: <6iaevn$5pb$1@nnrp1.dejanews.com>


Two problems:

  1. When you say 'files', I'm presuming you mean records. May sound petty (I understand that you're a novice), but I think you'll find that newsgroup/forum users are less likely to respond to you if you don't have basic terminology straight.
  2. When you say 'biggest', to what are you referring? For the sake of argument I'm going to presume that what you mean is the length (number of characters) in a given column. I will further presume that the column you mean is 'name'. If so:

SELECT * FROM tablename
WHERE rownum <=20
ORDER BY length(name) DESC

You should get values from all (both?) columns for the 20 records in your table returned in highest to lowest order based on number of characters in the 'name' column.

Good luck.
-Brendan

In article <6ia1g1$20v$2_at_antwerpen.planetinternet.be>,   "Elvis" <p2760_at_hotmail.com> wrote:
>
> hi,
>
> student needs help
>
> how can i select the 20 biggest files from my table????????
>
> table files
> -------------
> naam varchar2(50)
> size integer
>
> thanks
>
> bart
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Apr 30 1998 - 14:13:11 CDT

Original text of this message

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