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
Ok, this really solved. Final procedure code (works on SQL2K and SQL2K5):
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
-- return a