SSMS Import Data

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

SQL Server Management Studio (SSMS) provides the Import Wizard task, which you can use to copy data from one data source to another. We will import data from the excel file, which contains the following sample currency data.

image

Let's open SQL Server Management Studio and connect to the database.

image

Go to the Object Explorer, right-click on the Databases, and choose New Database...

image

It will open the New Database dialog.

image

Enter CurrencyDB as the name of the database and click on the OK button.

image

Now in the Object Explorer, you can see that a new CurrencyDB database is added, right-click on that database and choose Tasks > Import Data.

image

It will open SQL Server Import Export Wizard dialog.

image

On the Choose a Data Source dialog, choose Microsoft Excel from the Destination drop-down. You will also need to choose the Excel file path and version as you need and then click the Next button.

image

On the Choose a Destination dialog, select SQL Server Native Client 11.0 as a data source.

  • In the Server name drop-down, select a SQL Server instance.
  • In the Authentication section, choose Use Windows Authentication for the data source connection.
  • From the Database drop-down, select a database where data will be imported.

After everything is set, click the Next button.

image

On the Specify Table Copy or Query dialog, select Copy data from one or more tables or views and then click the Next button.

image

In the Select Source Table and Views window, you can choose one or more tables and views from which you want to export SQL Server data to Excel. Let's select the Currency and click the Preview button to preview which data will be imported from an Excel file.

image

Click the OK and then click the Next button.

image

On the Save and Run Package dialog, select the Run immediately and then click the Next button.

image

On the Complete the Wizard dialog, you can check all the settings set during of exporting process. If everything is right, click the Finish button to start exporting the SQL database to Excel.

image

You can view the importing process. When it completes, click on the Close button.

image

Now expand the CurrencyDB database, and you will see the Currency table, which contains three columns. You can also view the imported data by opening a New Query editor and specify any query and then execute it.

image

Got any SSMS Question?