I had a question about creating multiple rows in a (SQL Server) table. Which you can find here: http://www.aspmessageboard.com/forum/showMessage.asp?F=20&M=726240&P=1<BR><BR>The &#039;normal&#039; method is to loop through the creation of the row. But this has a poor performance. Bill, however, presented a great solution to this problem. I&#039;ve since come to find out that other (some more experienced) programmers didn&#039;t know about this solution so I thought that I&#039;d give back a little to this forum by posting the solution to inserting multiple rows.<BR><BR>Here is the T-SQL stored proceedure:<BR><BR>CREATE Procedure LincenseAdd(@NumberOfLicenses Int, <BR> @GroupID VarChar(20),<BR> @LicenseTypeID Int,<BR> @EffectiveDate DateTime,<BR> @ExpirationDate DateTime,<BR> @PurchaseDate DateTime,<BR> @PurchaseOrderNum VarChar(50),<BR> @CreatedUserID VarChar(20))<BR>AS<BR><BR>DECLARE @CurrentDate As DateTime<BR><BR>SET @CurrentDate = GetDate()<BR><BR>SET rowcount @NumberOfLicenses<BR><BR>INSERT INTO GroupLicenses(CreatedTS, GroupID, LicenseTypeID, EffectiveDate, <BR> ExpirationDate, PurchaseDate, PurchaseOrderNum, CreatedUserID)<BR>SELECT @CurrentDate, @GroupID, @LicenseTypeID, @EffectiveDate, <BR> @ExpirationDate, @PurchaseDate, @PurchaseOrderNum, @CreatedUserID<BR>FROM LicenseDummyTable<BR><BR>SET rowcount 0<BR><BR><BR>You do need to create a dummy table and populate it with however many records that you need to &#039;create&#039; in the new table. You will need to populate the dummy table using a loop. You&#039;ll get to see how inefficient that method is!<BR><BR>Here&#039;s the kicker, as you can see from the above proceedure, you never acutally copy any value from the dummy table to the new table! You just need to have a table to run the select statement against.<BR><BR>Using an INSERT INTO...SELECT statement turns out to be much more efficient than looping. I haven&#039;t done a true test, but INSERTING appears to be about 66% more efficient than looping.<BR><BR>Thanks again Bill!