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: Seqence Number Automation?

Re: Seqence Number Automation?

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 24 Aug 1999 09:44:03 +0200
Message-ID: <7ptih7$11m$1@oceanite.cybercable.fr>


Try this

select seq.nextval, num, val from
  (select num, sum(col) val from t group by num);

it will work fine.

Yan Zhou a écrit dans le message <7ps9a8$3ql_at_nntpa.cb.lucent.com>...
>Hi I'm trying to generate a summary table with a new field sum_id which
>should be generated whenever there's a new record. I thought of using
>sequence number but I found it can't be used with GROUP BY clause like this:
> select my_seq.NEXTVAL, sum(col),number
> from table
> group by number;
>Then what should I do? Anybody can help my out?
>Thanks a lot,
>Yan
>
>
Received on Tue Aug 24 1999 - 02:44:03 CDT

Original text of this message

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