+ Reply to Thread
Results 1 to 8 of 8

Microsoft Query hangs

Hybrid View

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    6

    Microsoft Query hangs

    This is a "cross-post" thread. See reply below for those links. *Please* don't disregard as annoying spam though, I seriously appreciate any effort to assist me, through any means.

    Hi, thanks for reading. Before I begin, let me say I have searched google a good amount before posting. I am posting with hope that someone has experience with this issue. With that said, lets get into it.


    I have an SQL Server that has a query (a view stored on the server) which takes roughly 10-20 seconds to execute. This execution time is the same in Excel 2007 if I import data to worksheet/pivottable. It is also the same in Excel 2003 while importing data into a worksheet. It returns about 350 rows.

    However, if I try to make a pivot table in 2003 based on this query, it is much slower. I can set it up fine, but refreshing this pivot table takes at least 10-20x as long to complete, in the order of 5-20 minutes, to sometimes taking so long that I give up and kill it by hitting escape a bunch.

    It's important to note that I am forced to used Microsoft Query to set up a pivot table in Excel 2003. There is no other way, I believe.

    While it is running, Excel just sits there saying "Waiting for data to be returned from Microsoft Query".

    Here is the weirdest part. Once the refresh starts, Microsoft Query loads in the background, you can see it on the taskbar. I believe that is expected behavior, but if I click on MS Query and view its datatable, I can see all the data is sitting there.

    So what is the hold up? MS Query has the data. Excel is waiting for it to be returned. What is going on? And remember from above, if I do a simple import data to worksheet, MS Query is not used and everything is fast.

    So my question is does anybody have any tips/advice on this issue? I need a way to not use MS Query for a pivottable's data source or I need a way to make MS Query not freeze up. I don't get why MS Query needs to be involved in the first place since I am not doing any parameters or so forth.

    Thanks in advance for any and all replies.
    Last edited by VBA Noob; 03-16-2009 at 07:04 PM.

  2. #2
    Registered User
    Join Date
    03-16-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Microsoft Query hangs

    I should add that the most obvious solution to this problem is to import the data into a worksheet, and then create a pivot table based on that data.

    This will not work for my situation because we need to be able to handle 65,000+ rows, so the data must be stored in the pivot itself.

    Our users cannot use Excel 2007 to avoid the 65k row limit.

    Regardless. I should be able to set up a pivot table based on a SQL Server table/view which only has 350 rows without waiting a century for it to complete, especially when I've proven it can complete in under 30 seconds in every other situation.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Microsoft Query hangs

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    03-16-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    6

    Unhappy Re: Microsoft Query hangs

    Sorry, I definitely didn't mean to break a rule of your forums. I have posted this question on several other boards. This should signify my desperation, not my desire to waste people's time. I hope you understand.

    http://www.vbaexpress.com/forum/showthread.php?p=179471
    http://www.xtremevbtalk.com/showthread.php?t=305541
    http://www.vbforums.com/showthread.php?p=3471934
    http://www.mrexcel.com/forum/showthread.php?p=1873573
    http://www.excelforum.com/excel-gene...ery-hangs.html
    Last edited by PegLegPete; 03-16-2009 at 03:03 PM.

  5. #5
    Registered User
    Join Date
    03-16-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Microsoft Query hangs

    SOLUTION FOUND!



    http://fluxenkind.blogspot.com/2008/...launching.html



    It doesn't make a lot of sense, but it 100% works. My pivot table refreshes now without using MS Query at all. Everything is much faster and I can even see the row count as it comes in, so it's not blind faith that it is working.

    :D
    Last edited by VBA Noob; 03-16-2009 at 07:16 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Microsoft Query hangs

    Thanks for posting back, PegLeg, I'm sure it will help others.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Microsoft Query hangs

    Good thinking Teylyn and thanks. I hate when I follow a link to an old thread and find the link is no longer in existance
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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