Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 inserting large amount of data

Author  Topic 

bigjt11
Starting Member

2 Posts

Posted - 2006-01-12 : 10:43:00
hello

i have just created a test database and now need to insert a large number of records into one of the tables, we were thinking of about 1 million records, has anyone got an sql script that i could use to create these records

cheers
john

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2006-01-12 : 10:47:33
from where are you inserting these records..? from a text file or another table..?
Go to Top of Page

bigjt11
Starting Member

2 Posts

Posted - 2006-01-12 : 11:11:47
looking to use a text file
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2006-01-12 : 11:31:34
look for BULK INSERT in sql server books online
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-01-12 : 13:35:34
Just to clarify:

Are you wanting to generate random, but appropriate, data? or to import some real/existing data from an external source [such as a "text" file]?

Kristen
Go to Top of Page

avmreddy17
Posting Yak Master

180 Posts

Posted - 2006-01-12 : 16:28:32
BCP or BULK INSERT would be fast.....Once you do this back up the database ....
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-13 : 01:05:05
Also refer this
http://www.nigelrivett.net/SQLTsql/ImportTextFiles.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -