Problem:
I want to increase the number based on the table. So, for example, if the table contains a row
1 1 2 3 4 4 4 5
the mytable column should grow based on this, taking max (row) + 1 in the above column. Therefore, the result should look like this:
6 6 7 8 9 9 9 10
This is the code so far:
OPEN cur DECLARE @WORKING_ON_ID INT FETCH NEXT FROM cur INTO @WORKING_ON_ID WHILE @@FETCH_STATUS = 0 BEGIN SET @MAX_ID = @MAX_ID + 1 UPDATE
Could you help me in solving this problem. Thanks!
Ish
source share