Hi,
I have about 700,000 rows of data (10 characters each) in Excel.
I am trying to insert them into a temp table so I can run queries against it:
Needless to say I have stack space and memory errors when trying to insert all 700,000 rows. I could break it down into several chunks but my query would run much better if all the data is there at once.
Is there a better way I should go about this? Is there something I can add into my lines to make this more efficient? Should I 'GO' between each one?
Thanks!
Brian
I have about 700,000 rows of data (10 characters each) in Excel.
I am trying to insert them into a temp table so I can run queries against it:
Code:
declare @temp table (test varchar(20), test2 int)
insert into @temp values ('D0000708',1)
insert into @temp values ('D0000708',2)
insert into @temp values ('D0000708',3)
insert into @temp values ('D0000709',1)
insert into @temp values ('D0000709',2)
insert into @temp values ('D0000709',3)
Needless to say I have stack space and memory errors when trying to insert all 700,000 rows. I could break it down into several chunks but my query would run much better if all the data is there at once.
Is there a better way I should go about this? Is there something I can add into my lines to make this more efficient? Should I 'GO' between each one?
Thanks!
Brian