Loading Data into Tables

  • I am currently in the process of designing an Insert statement to load a ton of data into my products table. The products table in my database has several foreign keys to other tables and referential integrity is highly enforced. What is the best way to load my products table? Drop the constraints on the products table and load it, then reapply the constraints? Create a trigger? Create a bunch of insert statements loading the other tables surrounding the products table after loading the products table?



  • If you've got all those constraints (a good thing) do you want to bypass them when you load? If you're sure the data is good, go for it. DTS is a good choice, other ones are bulk insert and bcp.


  • I'd look at using DTS, but perhaps to a staging table. Then you can use stored procedures to queries to move the data while maintaining the foreign keys.

    Steve Jones


Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply