Re: Procedure based sequencence generator repeating values (SOLVED)

2006-05-06 Thread Armin Waibel
Hi Edson, congratulation for figure out this issue and thanks for detailed description and fixed procedure. I will add a link to your last post in sequence-manager documentation and update the procedure example for mssql. regards, Armin Edson Carlos Ericksson Richter wrote: Ok, this really

Re: Procedure based sequencence generator repeating values (SOLVED)

2006-05-05 Thread Edson Carlos Ericksson Richter
Ok, this really solved. Final procedure code (works on SQL2K and SQL2K5): code CREATE PROCEDURE OJB_NEXTVAL_PROC @SEQ_NAME varchar(150) AS declare @MAX_KEY BIGINT set nocount off set @MAX_KEY = 0 UPDATE OJB_NEXTVAL_SEQ SET @MAX_KEY = MAX_KEY = MAX_KEY + 1 WHERE SEQ_NAME = @SEQ_NAME --