Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Hello. Thanks for your suggestion. What does "set-based" mean and why is it important in this context? Also, importing into a table first was one the options I had read about and since I do this operation so infrequently I was hoping for something that could save me time from my current method but not not require me to learn to much. Don't get me wrong, because I'm not complaining about your suggestion, but I think I may find out that my current method, albeit as painful as it is, is better than the others for me.
–
idon'twearsuitsOct 27 '11 at 1:33

2

SQL Server is optimized for set based operations. It will perform operations much faster when you throw a couple thousand rows at the problem compared to a single operation at a time.
–
mrdenny♦Oct 27 '11 at 2:09

1

Using BULK INSERT is very straight forward. And altering the commands you already have should be easy too. But I guess it depends on whether you want to do something without learning anything. Another option could be PowerShell, which can very easily run through the lines of a file, calling a set of commands for each.
–
Rob FarleyOct 27 '11 at 2:58