I have this script written and when I run it I get
Server Msg 512, Level 16, State 1, LIne 3
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=......
The script is as follows
Use VRSDB
GO Declare @scounter smallint
SET @scounter=0
WHILE (select sitenumber from sites)>1
BEGIN
UPDATE sites
SET sitenumber=1+@sitecounter
SET @sitecounter=@scounter+1
CONTINUE
END
@scounter is my counter to increment the sitenumber (field) to update each row.
Any help would be appreciated.
Thanks.
Server Msg 512, Level 16, State 1, LIne 3
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=......
The script is as follows
Use VRSDB
GO Declare @scounter smallint
SET @scounter=0
WHILE (select sitenumber from sites)>1
BEGIN
UPDATE sites
SET sitenumber=1+@sitecounter
SET @sitecounter=@scounter+1
CONTINUE
END
@scounter is my counter to increment the sitenumber (field) to update each row.
Any help would be appreciated.
Thanks.