November 19, 2013 at 3:27 pm
I want to insert about 5000 (typically, can be 10K+ at times) rows into SQL server at a time. My insert statements are generated by a C# program.
One way could be by simply generating a big string full of these SQL statements and then actually making SQL server execute them using `SqlCommand.ExecuteNonQuery();` But there is a risk that SQL server might not be able to execute a big statement like that.
Is there a way I could sort of push the SQL statements to some kind of "SQL server buffer" (if there is one) and then finally execute them all ?
Thanks.
November 20, 2013 at 7:40 am
Duplicate post. Direct replies here. http://www.sqlservercentral.com/Forums/Topic1515817-391-1.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
November 21, 2013 at 11:19 am
Sean Lange (11/20/2013)
Duplicate post. Direct replies here. http://www.sqlservercentral.com/Forums/Topic1515817-391-1.aspx
Had no choice. Will miss out on the folks that hang out only on this sub forum. This site and msdn...actually everything should move to Stack overflow which is far more convenient. There is no confusion, only simplicity and solutions. How about an ETL job for that movement ? 🙂
November 21, 2013 at 11:52 am
blasto_max (11/21/2013)
This site and msdn...actually everything should move to Stack overflow which is far more convenient. There is no confusion, only simplicity and solutions. How about an ETL job for that movement ? 🙂
Don't think you will find a lot of people around here agreeing that SO is better. There is less than a 0% chance that MSDN is going to migrate to SO. SO is for questions and MSDN (or technet) is for system documentation, but it happens to allow comments.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply