Re: Creating sequences.

From: Michael P. Vergara <mvergara_at_sctcorp.com>
Date: 1996/03/06
Message-ID: <1996Mar6.154113.3068_at_nosc.mil>#1/1


In article <4h1fr6$s2r_at_news.dot.gov>, rfrazier_at_mailstorm.dot.gov (Richard Frazier) says:
>

 (stuff snipped)
>
>: create sequence job_sequence_num
>: increment by 1
>: maxvalue (select distinct job_num_yy||job_num_mm||job_num_dd
>: from job_log_tbl
>: order byh job_num_yy||job_num_mm||job_num_dd;)
>: minvalue 1
>: cycle;
>

I also tried something like this, where the 'start with' value was generated by a select. Alas, it, too failed. However, I was able to do it with TWO select statements, as in:

column cval new_value newval
select max(note_id) cval from note_table; create sequence note_seq
  start with &&newval
  increment by...etc;

And this works.

HTH
Mike Received on Wed Mar 06 1996 - 00:00:00 CET

Original text of this message