How to Import Data in SQL Server
Data import is a process of converting data stored in one format into another.
It is easy to import data in SQL Server using Data Pump, which automates this process and offers a wizard to guide you. You will get a correct and painless way to:
- Import data into a table from MS Access (2003, 2007+), CSV, DBF (Foxpro, dBase III, dBase IV, dBase 7), MS Excel, Text, XML formats
- Migrate data from other servers
- Optimize your import by saving the import settings as a template for future usage for importing data with the help of the wizard, and get a customized import immediately next time
To import data using the Data Import wizard, you need to take a few simple steps:
- Select an import format and a file with the data that you want to import.
- Select a destination table.
- Adjust data formats for the Source data.
- Set additional options to customize the import.
- Set a correspondence between the Source file content and columns of the Target table.
- Select a data processing mode, e.g., whether to add the records to the Target table or update the existing ones, or both.
- Define how Data Pump should handle errors during import and whether to write a log file.
When executing SQL queries in batches, errors handling may be performed not as a user may expect it to be performed, because such queries will be executed till the end of the batch in any case, even if execution should have been aborted because of some errors inside the batch, and that’s default behavior of SQL server and cannot be changed.