I want to generate some integers in SQL Server loop and add it to end of string that is a long number
Declare @i int
Set @i = 10
While @i < 45
Begin
insert into AllowedStudents (GroupID, StudentNumber)
values ('1', '9210410' + @i)
SET @i = @i + 1
End
but when insert process ends I see this result :
28240 1 9210420
28241 1 9210421
28242 1 9210422
28243 1 9210423
against
28240 1 921041020
28241 1 921041021
28242 1 921041022
28243 1 921041023