Download ArticleDownload Article

This article will help users to embed SQL Query in Excel 2010 and create a dynamic connection in Excel.

  1. How.com.vn English: Step 1 Go to Data tab and select From Other Sources as shown in the screen shot below.
  2. How.com.vn English: Step 2 Select “From Data Connection Wizard” in the drop down.
    Advertisement
  3. How.com.vn English: Step 3 Data Connection Wizard will open.
    Select “ODBC DSN” from the available option and click “Next”.
  4. How.com.vn English: Step 4 Connect to ODBC Data Source window appears.
    Where a list of database available in our organization will be displayed. Select the appropriate database and click on “Next”.
  5. How.com.vn English: Step 5 Select Database and Table window appears.
  6. How.com.vn English: Step 6 We can select the database and the table from where we wish to pull the data.
    So, select the database and table as appropriate in our case.
  7. How.com.vn English: Step 7 Select Finish in “Save Data Connection File and Finish” window.
    This window will pull up the File Name based on our selection in previous screens.
  8. How.com.vn English: Step 8 Import Data window appears where we can select options as per our need and click OK.
  9. How.com.vn English: Step 9 Select “From Data Connection Wizard” in the drop down.
  10. How.com.vn English: Step 10 Go to Data tab and Click on Connections.
    Click on Properties in the following window.
  11. How.com.vn English: Step 11 Go to Definitions tab in the following window.
  12. How.com.vn English: Step 12 Write SQL query in “Command Text” and Click OK.
    Excel will display the result as per the query.
  13. How.com.vn English: Step 13 Now go to Microsoft Excel and validate if the results are as per the SQL Query written.
  14. Advertisement


Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 384,377 times.
      How helpful is this?
      Co-authors: 5
      Updated: January 8, 2016
      Views: 384,377
      Categories: Microsoft Excel
      Thanks to all authors for creating a page that has been read 384,377 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement