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: Sequences and group by

Re: Sequences and group by

From: <xhoster_at_gmail.com>
Date: 24 Apr 2007 15:48:44 GMT
Message-ID: <20070424114845.864$YM@newsreader.com>


klaus1 <klaus.schu_at_gmail.com> wrote:
> hi!
>
> I try to use a select statement whit an myseq.nextval, but I need an
> group by at the end of the select.
>
> select myseq.nextval, a, b, c from table
> groupby a, b, c;
>

select myseq.nextval, a, b, c from (select distinct a, b, c from table);

Or to preserve the (rather silly, in this context) group by:

select myseq.nextval, a, b, c from (

   select a, b, c from table group by a, b, c );

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB
Received on Tue Apr 24 2007 - 10:48:44 CDT

Original text of this message

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