Hi, hope someone can spend a minute checking out my script error. The following is part of my SQL statement. It has got syntax error near "="
I was hoping the script could run 100 times and print number 1 to 100.

DECLARE @ID int
SET @id = 1
EXEC (&#39; WHILE &#39; + @id + &#39; <= 100 &#39; + &#39; BEGIN SELECT &#39; + @id +
&#39; SET &#39; + @id + &#39; = &#39; + @id + &#39; + 1 &#39; + &#39; END &#39; )

Any input is most welcome.


Richard