Posted by: rawbee June 5, 2008
SQL Automatic incremental generator
Login in to Rate this Post:     0       ?        

Can replace line 4 by since you alreay have lastid

SELECT @NewID =(LTRIM(SUBSTRING(@LastID,2,60)+1)) FROM test

all the best

 

Read Full Discussion Thread for this article