+ Reply to Thread
Results 1 to 4 of 4

Returning data from Microsoft Query to Excel

  1. #1
    Registered User
    Join Date
    07-08-2011
    Location
    New York City
    MS-Off Ver
    Excel 2010
    Posts
    23

    Returning data from Microsoft Query to Excel

    I am trying to use queries I have been running in MS SQL Server Management Studio, to return data in Excel where it would display as pivot. Some queries I was able to use through Excel but few others are not returning anything.

    Any idea what could be the cause? I am doubting it has something to do with the query itself - but they are displaying results properly in MS Query, they are just not returning any data to Excel.

    Thanks.

  2. #2
    Registered User
    Join Date
    02-02-2013
    Location
    texas
    MS-Off Ver
    Excel 2003/2010
    Posts
    59

    Re: Returning data from Microsoft Query to Excel

    Could be the website... What is the website?

  3. #3
    Registered User
    Join Date
    07-08-2011
    Location
    New York City
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Returning data from Microsoft Query to Excel

    I receive the data from the SQL DB on our server. Just to clarify, I do get valid results in Microsoft Query but the problem is in returning this data to Excel in form of a table. Is there something in the query itself that would prevent the results from displaying properly in Excel? I can see results in MS SQL Server Management Studio also so query is fine, but I would prefer if I could just use Excel straight up instead of copying data and formatting manually.

  4. #4
    Registered User
    Join Date
    07-08-2011
    Location
    New York City
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Returning data from Microsoft Query to Excel

    Apparently there was an issue passing the data to Excel because the query contained Transact-SQL Variable.

    Adding "SET NOCOUNT ON" to the beginning of the query did the trick.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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