SQL Server leads database data into Excel document method

Source: Internet
Author: User
Tags sql server query

SQL Server leads database data into Excel document method

Recently the company needs to download Uniport data to compare with the previous data, so there is no need to export the database data, the SQL Server table data exported to Excel files in two ways.

For SQLServer2005 or SQLServer2008, SQLServer2008 R2

  1. method One : For write query SQL statement is the direct Write query statement query results. Such as:

  2. Next to the desktop, create a new empty Excel file.

    Next go back to SQL Server query interface. Right-click on the blank column in the upper-left corner of the query results and click "Copy with Title". The data has been copied. Such as:

    (Note: This method is not applicable in navicat)

  3. Then open the previously built Excel file to paste the copied data into Excel. Such as:

  4. method Two : Use the database export method for queries that do not write query SQL statements.

    Select the database where you want to export the data, and right-click will bring up a right-click menu. Click "Tasks" and click "Export Data (x)". Such as:

  5. Clicking on "Export Data (x)" will pop up an interface and fill in the good information. Such as:

  6. Click Next to jump to the interface as in 1. With the Excel type selected in the target, the interface information is changed and the exported Excel path is selected. such as 2.

  7. Click Next to jump to the following screen and select the first option. Such as:

  8. Click Next and tick the table you want to export. Such as:

  9. Click Next to jump to the following screen:

  10. Click Next: Jump to such as 1 interface, select Next click Finish, will jump to such as 2 interface. The proof has been exported successfully.

  11. When you open Excel, you can see the exported Excel. Such as:

SQL Server leads the database's data into an Excel document method

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.