Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: advanced SQL

Re: advanced SQL

From: Alberto <iltrex_at_libero.it>
Date: 14 Jan 2003 02:53:33 -0800
Message-ID: <fe136e10.0301140253.76bf8686@posting.google.com>


> You must mean the analytical functions (8i and up):
>
> select
> row_number() over (partition by charfield order by charfield),
> charfield,
> numfield,
> from bc4j.test

That's it! Thanks.

In the mean time, I solved the problem with a nice trick.

Something like this:

select counter.c,Tt.*
from bc4j.test tt,

     (select rownum c from bc4j.test) counter where counter=(select count(*)+1

               from bc4j.test
               where tt.charfield=charfield
               and  rowid<tt.rowid)

It works! Pheraps it's slower that with partition, but it works! Nice.

Now I try with over.

thank you very much. Received on Tue Jan 14 2003 - 04:53:33 CST

Original text of this message

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