Wednesday, September 07, 2005
Education t-sql style
Lessons to pick up.
SET @number = INT(@sequenceCode)
IF @number > 0
SET @number = @number + 1
IF @number = 100
SET @number = 0
IF @number < 10
SET @sequenceCode = '0' + STR(@number)
ELSE
SET @sequenceCode = STR(@number)
DROP DATABASE
The last statement cracked me up :)
Cheers
Tim...