Re: Help with ROW_COUNT()

From: Klaus Zeuch <KZeuchnospam_at_hotmail.com>
Date: Mon, 4 Dec 2000 19:16:38 +0100
Message-ID: <90gpnj$62q$1_at_papyrus.erlm.siemens.de>


If you want to use row_number, you have to code:

select * from (
select pkey, value, row_number() over (order by ........) as valcol from table1)
where valcol = 5

Klaus
<sw_at_weinerfamily.org> schrieb in im Newsbeitrag: 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 - 19:16:38 CET

Original text of this message