Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Importing data from query - too few parameters?

Latest post Tue, Apr 7 2009 5:49 AM by Back2Basics. 5 replies.
  • Mon, Apr 6 2009 11:21 AM

    • Back2Basics
    • Top 100 Contributor
    • Joined on Mon, Apr 6 2009
    • Cardiff
    • Posts 10
    • Points 189

    Importing data from query - too few parameters?

    I am using office 2003

    I am trying to import data from a database that I am using. However I would like to import the data from a query within the DB.

    The query prompts for a "team member name" and only shows the items from the main table that are not completed.

    I have tried to import that data using MS Query (Data->Import external data-> new database query)

    But when i run through the wizard I simple get an error stating that it has 1 too few parameters. I remember this being talked about at the excel user conference the other day, but can't find the files that cover it - and so can not remember how this is done.

    Any help would be appreciated.

    • Post Points: 21
  • Mon, Apr 6 2009 11:32 AM In reply to

    Re: Importing data from query - too few parameters?

    The database query has a parameter and Excel doesn't know what to populate it with...

    Remove the parameter from the database query (or create a parameter-less copy) and then re-add it in MS query when you are bringing the data into Excel.

    • Post Points: 21
  • Mon, Apr 6 2009 11:42 AM In reply to

    • Back2Basics
    • Top 100 Contributor
    • Joined on Mon, Apr 6 2009
    • Cardiff
    • Posts 10
    • Points 189

    Re: Importing data from query - too few parameters?

    I have done this now, but how do i add a query when in excel?

    • Post Points: 37
  • Mon, Apr 6 2009 11:54 AM In reply to

    Re: Importing data from query - too few parameters?

    In 2003, go to "Data, Import External Data, New Database Query..." Then, follow the wizard.

    In 2007 it's on the Data tab of the ribbon.

    When you get to the last stage of the wizard you can choose to "View data or edit query in Microsoft Excel".

    This is where you can add parameters, calculated fields, sorts etc.

    • Post Points: 5
  • Mon, Apr 6 2009 12:07 PM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 543
    • Points 9,415
    • MVP

    Re: Importing data from query - too few parameters?

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Tue, Apr 7 2009 5:49 AM In reply to

    • Back2Basics
    • Top 100 Contributor
    • Joined on Mon, Apr 6 2009
    • Cardiff
    • Posts 10
    • Points 189

    Re: Importing data from query - too few parameters?

    Thanks to both of you, the link for pre2007 was exactly what I needed Nick. Thanks so much, V Helpful

    • Post Points: 5
Page 1 of 1 (6 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.