Hi,
I want to copy records of a table say employee into the same table.
For Example Table Employee contains 5 records.
So i want to insert the same 5 records again into the same table Employee 20 times.
I have tried the following Query (which is inserting records in another table) :
DECLARE @intFlag INT
SET @intFlag = 1
WHILE (@intFlag <=20)
BEGIN
SELECT * INTO table2 FROM table1
SET @intFlag = @intFlag + 1
END
GO
If i am copying records into the same table then
Error is displayed :
There is already an object named table1 in the database