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: a query in Oracle Report

Re: a query in Oracle Report

From: Bent Stigsen <ngcdo_at_thevoid.dk>
Date: Mon, 11 Oct 2004 23:34:55 +0200
Message-ID: <416afc61$0$296$edfadb0f@dread14.news.tele.dk>


Anthony Plunkett wrote:
> mo wrote:
>

>> when I issue a query in Oracle Report:
>>
>> 1. select * from
>> 2. (
>> 3. select first_name, last_name
>> 4. from students
>> 5. order by first_name
>> 6. )
>> 7. where rownum<3;
>>
>> I received a warning of missing a ")", if I
>> omit the 5th line, it's fine. should I use a cursor
>> to solve it?

>
>
> Why not just use:
>
> SELECT first_name, last_name
> FROM students
> WHERE rownum <3
> ORDER BY first_name;
>
> Saves on a subquery.. ?

Not the same, selection comes before sorting, he wants the opposite.

Question was multiposted to c.d.o.misc. Think he got an answer there.

/Bent Received on Mon Oct 11 2004 - 16:34:55 CDT

Original text of this message

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