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: Rownum function with order by statement

Re: Rownum function with order by statement

From: vs <slootsky_at_erols.com>
Date: Sun, 10 Oct 1999 07:39:57 -0400
Message-ID: <38007B0D.30B45155@erols.com>


You can do it in Oracle 8.1.5 or use subquery with DISTINCT in FROM clause.

Mark Malakanov wrote:

> ROWNUM value calculated before sorting. Unfortunately so.
>
> try
>
> select rownum, a
> from (select distinct a from sometable)
>
> Mark
>
> Harlin Setiadarma <harlins_at_bigfoot.com> wrote in message
> news:37dd0b2b.0_at_news.cbn.net.id...
> > Hi,
> > can anybody help me ?
> >
> > I want to :
> > select rownum, a
> > from sometable
> > order by a
> >
> > where a :
> >
> > 5
> > 3
> > 6
> > 2
> >
> > The result I expected is :
> > 1 2
> > 2 3
> > 3 5
> > 4 6
> >
> > Thanks in advance....
> >
> >
> >
> >
> >
> >
Received on Sun Oct 10 1999 - 06:39:57 CDT

Original text of this message

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