handkot (2/17/2012)
I have a table containg a large number
DECLARE @int INT;
SET @int = 1;
WHILE @int <=1000
BEGIN
INSERT INTO TestTable (id, col)
VALUES (@int, 'name' + CAST(@int AS VARCHAR(100)));
SET @int += 1;
The performant alternative:
Create a Tally or Numbers Table
[/url]
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP