Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Seqence Number Automation?
Try:
select TEMP.seq, sum(col), number
from table, (select test_seq.nextval as seq
from dual) TEMPgroup by TEMP.seq, number;
Yan Zhou wrote in 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 - 04:34:06 CDT