O'Reilly logo

Introducing SQL Server by Mike McQuillan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 10

image

Creating Data Import Scripts

We’ve just seen, in some detail, how the BULK INSERT statement can be used to import files into database tables. Unfortunately, there are some limitations with BULK INSERT, which meant we had to remove one of our contact records from the appropriate files.

Fortunately, T-SQL can come to our rescue. In this chapter, we are going to create a script to insert a contact record and its associated child records (addresses, phone numbers, and so on). I’ll introduce lots of new T-SQL terms in this chapter, so hold your nose and jump in!

Purpose of the Import Script

Our aim is to successfully add Roald Dahl to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required