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: Guido Konsolke <Konsolke_at_triaton.com>
Date: Wed, 15 Jan 2003 08:06:19 +0100
Message-ID: <1042614377.802874@news.thyssen.com>


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.

>

> Or:
>

> SELECT MOD(ROWNUM+2,3) + 1, *
> FROM TEST;

> Received on Wed Jan 15 2003 - 01:06:19 CST

Original text of this message

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