Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: advanced SQL
Hi,
sorry, but I must say that your solution won't work at all. Tom's is the way to go.
Greetings,
Guido
"Wanderley" <wces123_at_yahoo.com> schrieb im Newsbeitrag
news:TS2V9.35936$aG4.1930319_at_twister.austin.rr.com...
> Alberto wrote:
> >>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.
>
>
![]() |
![]() |