I have the following stored procedure that when I run it i keep running out of locks. I can't figure out a way to batch it so it does a managable # of records at a time, I am dealing with about 3 million records in this table. There is no Key field.
CREATE PROCEDURE sp_editimportdata
AS
insert into [sales and use returns](
[main acct],[sub acct] ,[tax type] ,period ,source ,[trandateorig] ......[sign-d] ,[tax due], remitted )
select disc.col001,
disc.col002 , disc.col003 , disc.col004 , disc.col005 , disc.col006 , disc.col007 ......, disc.col046 ,
(convert(money,disc.col047)) , (convert(money,disc.col048))
from disc
Thanks,
Phil
CREATE PROCEDURE sp_editimportdata
AS
insert into [sales and use returns](
[main acct],[sub acct] ,[tax type] ,period ,source ,[trandateorig] ......[sign-d] ,[tax due], remitted )
select disc.col001,
disc.col002 , disc.col003 , disc.col004 , disc.col005 , disc.col006 , disc.col007 ......, disc.col046 ,
(convert(money,disc.col047)) , (convert(money,disc.col048))
from disc
Thanks,
Phil