Christoph Weser wrote :
>
>Hello!
>
>Short question: Is it possible to increment a sequence manually?
>Example: My sequence goes 1000, 1001, 1002, ....but after a 
>special event it
>should go on with 2000, 2001, 2002,...
>
>Any other solution than dropping and recreating the sequence?
>
>Thanx a lot!
>
>Chris
>
>-- 
>MaxDB Discussion Mailing List
>For list archives: http://lists.mysql.com/maxdb
>To unsubscribe:    
>http://lists.mysql.com/maxdb?>[EMAIL PROTECTED]
>
>

The following db-procedure can do the job :

CREATE DBPROC INC_SEQUENCE (IN limit INTEGER) AS
VAR X INTEGER;

DO
   X = SEQ.NEXTVAL;
WHILE X < limit;

Best Regards,
Thomas

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to