0

I need to insert 26K rows of values into a temp table but run into 1,000 limit error. Is there any work around to this?

I will need to this type of insert many times and need to use temp tables for all my work.

IF OBJECT_ID('tempdb..#Budget') IS NOT NULL 
BEGIN
    DROP TABLE #Variables 
END

CREATE TABLE #Budget 
(
     [SBU] VARCHAR(3),
     [B_Type] VARCHAR(50), 
     [D_Type] VARCHAR(50),
     [C_Direct] VARCHAR(50),
     [Dest] VARCHAR(50),
     [D_Month] VARCHAR(50),
     [D_Year] INT,
     [Pax] INT, 
     [Rev] INT
)

INSERT INTO #Budget ([SBU], [B_Type], [D_Type], [C_Direct], [Dest], [D_Month], [D_Year], [Pax], [Rev])
VALUES (.....)
marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425

0 Answers0