Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
Aug 5, 1998

SQL and arrays of data

Question:
I need to enter up to 1,600 measured data points into a SQL database. Each point makes one record. Is there a way to enter all of these records into the database without making 1,600 hits on the database? Is there some sort of block data entry? Right now I pass in a series of strings containing the points and parse the string inside the stored procedure. However, this way is certainly not very elegant.

Answer:
1,600 hits on a SQL Server database is not really all that much. However, if you want to make your inserts as painless as possible, you should check if BCP will work for you. Create a text file in which each row represents the values to be inserted into your table. Using BCP you can load them all into the Server quickly and painlessly. For more information on BCP, look at "Books Online," which walks you through the process.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date