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 -> Setting Sequence

Setting Sequence

From: <twm_at_tlg.net>
Date: Tue, 06 Apr 1999 20:04:30 GMT
Message-ID: <7edpc8$g96$1@nnrp1.dejanews.com>


Is there any way to set a sequence based on the size of a table in a script.

For Instance:
drop sequence new_foo_id;
create sequence new_foo_id start with last_foo_id+1;

last_foo_id is a function that returns the max of the id field.

When I tired the above I get an error:
ORA-01722: invalid number

Thanks,
Tom

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Apr 06 1999 - 15:04:30 CDT

Original text of this message

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