How SQL Server imports data from an Excel table into a database

Source: Internet
Author: User
Tags import database management studio sql server management sql server management studio

In the initial phase of the database, after we have some data in Excel, we need to import the Excel column name (the field name of the corresponding database table after import), and the corresponding sheet (renamed to the table name after the import database) to the specified database.

Equivalent to importing the entire data of a table. Before importing, you need to check if a table with the same name exists, and the imported data table ends with "$" to avoid table duplication and to differentiate. Let's take a look at the specific steps below.

  1. 1

    Open SQL Server Management Studio and enter the import data interface by the path in the diagram.

  2. 2

    The Excel file needs to be ready for import and cannot be opened. Click Next.

  3. Data source: Select Microsoft excel In addition to the Excel type of data, SQL also supports many other data source types.

  4. Select the Excel file that you want to import. Click Browse to find the imported file OK.

  5. Confirm that the file path is not a problem, click Next.

  6. The default is to use WINODWS authentication instead of using SQL authentication. Enter the database password, note: database, here to see whether the database is imported. You can also change it here temporarily and select a different database.

  7. Select Import data Excel table content scope, if there are several sheet table, or a sheet table some data we do not want to import, you can write the query specified data for import. Click Next.

  8. Select the sheet table that we need to import, for example, when I change the sheet table name to price here, the SQL database table that imports the epigenetic polygons is price$. Click to proceed to the next step.

  9. Click to proceed to the next step.

  10. Here is the complete display of our imported information, the execution of content, once again confirmed, click Finish, start execution.

  11. You can see the process and progress of task execution.

  12. Successful execution: We can look at the result of the execution and have transmitted 1754 rows, representing the import of 1754 data from the Excel table, including the column name header. This completes the execution of the SQL query statement: SELECT * from price$ to view the imported data content.

How SQL Server imports data from an Excel table into a database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.