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: Anthony Plunkett <doobeh_at_thefort.org>
Date: Tue, 12 Oct 2004 00:26:59 +0100
Message-ID: <416b16c2$0$11828$afc38c87@news.easynet.co.uk>


Bent Stigsen wrote:

> 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

Ahh I see, should have really noticed that myself. Thanks to both of you for pointing out the difference, should save me making a similar mistake in the future (hopefully) :]

Regards,

Anthony. Received on Mon Oct 11 2004 - 18:26:59 CDT

Original text of this message

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