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

Seqence Number Automation?

From: Yan Zhou <yanzhou_at_cbgbcs.cb.lucent.com>
Date: Mon, 23 Aug 1999 16:01:56 -0400
Message-ID: <7ps9a8$3ql@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 Mon Aug 23 1999 - 15:01:56 CDT

Original text of this message

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