Populate a temp table with same ID fopr a number of time

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a small database for managinf stock. My client wants to print lable
that include item description and barcode as well so that these label can be
put on each box. I have created the following store proc to (call from a
form) run for a number of time using For .. Next until a desire number is
meet.

INSERT INTO dbo.tmpPrintLabel
(ID)
SELECT @ID AS ProductID

The probelm is that thi SP run very slow. For inserting 20 label, it took
about 1 minute or so.
Could any body suggest to improve to run time?

SF
 
Back
Top