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: Help with ROW_COUNT()

Re: Help with ROW_COUNT()

From: Dorfmaxl <Dorfer.Markus_at_surfeu.at>
Date: Mon, 04 Dec 2000 17:24:29 GMT
Message-ID: <hrQW5.37155$4d1.1899464@news.chello.at>

Sorry, a comma is missing:

 select * from
 (select rownum rownum_alias, pkey, value from table1)  where rownum_alias=5

"Dorfmaxl" <Dorfer.Markus_at_surfeu.at> wrote in message news:dqQW5.37148$4d1.1898423_at_news.chello.at...
> Hi !
>
> This should work:
>
> select * from
> (select rownum rownum_alias pkey, value from table1)
> where rownum_alias=5
>
> DM
>
> <sw_at_weinerfamily.org> wrote in message
> news:3A2BB41B.12EA754D_at_weinerfamily.org...
> > I need to find the 5th row in a selection, ordered by a value column.
> > Since ROWNUM takes affect after the rownum is assigned it won't work.
> > So I tried using ROW_NUMBER(). However the following query doesn't
> > work:
> >
> > SELECT pkey, value,
> > ROW_NUMBER() over (ORDER BY value ASC NULLS LAST) AS valcol
> > FROM table1
> > WHERE valcol = 3
> >
> >
> >
>
>
Received on Mon Dec 04 2000 - 11:24:29 CST

Original text of this message

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