I am new to SQL Server (using 6.5) & wanted to generate some test data by running through the equivalent of a DO WHILE loop 'n' times. 7.0 would allow me to do control the loop by SET @MYCOUNTER = 1 but in 6.5 this seems to be invalid syntax. How would you do this sort of thing in 6.5?