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: Mon, 11 Oct 2004 21:27:11 +0100
Message-ID: <416aec9e$0$9662$afc38c87@news.easynet.co.uk>


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.. ?

Anthony. Received on Mon Oct 11 2004 - 15:27:11 CDT

Original text of this message

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