+ Reply to Thread
Results 1 to 2 of 2

Microsoft Query to return a Query result from SQL Server Connection

  1. #1
    Registered User
    Join Date
    05-24-2021
    Location
    Austin, TX
    MS-Off Ver
    2013
    Posts
    1

    Post Microsoft Query to return a Query result from SQL Server Connection

    Hello,

    I am trying to use Microsoft Query to connect to my SQL Server instance to return a query result into my Excel workbook. Basically, i have a column of sql queries and then have a column titled "RESULT", which I'm using to return the result of my queries. I got it to work briefly, but as soon as I refreshed my results, my workbook goes crazy and starts inserting many random cells with the database connection that I created. I would also receive errors like "Failed because you cannot paste over a Pivot table" or something like that. I'm not sure what is happening?

    My question is, what are the best practices for working with Microsoft Query for my specific need? What are the appropriate steps to return a specific result to an individual cell in Excel, rather than return an entire table?

    Thank you,
    J

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Microsoft Query to return a Query result from SQL Server Connection

    You might be better served by downloading Power Query and using that instead of Microsoft Query.

    Here are some links to better familiarize you with Power Query.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 05-29-2020, 09:57 AM
  2. [SOLVED] How to access data via VBA from a Connection Only Power Query query.
    By MLAN_75 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2020, 11:45 AM
  3. Microsoft query Sql Server login in Excel 2010
    By so_nice3 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-12-2013, 05:55 AM
  4. Connection but no records writing VBA query to retrieve data from SQL Server 2012
    By sportsguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2012, 03:20 PM
  5. Excel Query connection to Server Help...
    By ImtiazV in forum Excel General
    Replies: 0
    Last Post: 08-03-2007, 11:04 AM
  6. [SOLVED] Changing Server on a Microsoft Query
    By Grantley in forum Excel General
    Replies: 0
    Last Post: 03-31-2005, 06:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1