Re: How to create a sequence with a dynamic start value

From: Carlos <miotromailcarlos_at_netscape.net>
Date: Thu, 12 Jun 2008 00:55:54 -0700 (PDT)
Message-ID: <a29f466a-1d4b-4064-8653-37c81b7e8291@k13g2000hse.googlegroups.com>


On 12 jun, 09:17, Norbert Pürringer <thalio..._at_graffiti.net> wrote:
> Hello,
>
> what is the best way to create a sequence with a dynamic start value.
>
> The following statement is not valid:
>
> create sequence TEXT_SEQ start with select NVL(max(ID),0) + 1 from
> TEXT;
>
> Thank you,
> Norbert

Take a look at 'Dynamic SQL.'

HTH. Cheers.

Carlos. Received on Thu Jun 12 2008 - 02:55:54 CDT

Original text of this message