+ Reply to Thread
Results 1 to 6 of 6

What's difference between a database query and a database table query?

  1. #1
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    What's difference between a database query and a database table query?

    Please help a beginner with some query basics. I have an Excel workbook that contains a connection to an Access database. When I place the cursor on a cell within the data range of that query and click on Properties within the Connections group, a window opens that is titled 'External Data Range Properties'. Furthermore, the 'Table Tools' menu does not open up.

    If, however, I create a new query, using the 'From Other Sources/From Microsoft Query' route, I get something different. The data from this new query goes into a table; i.e., when I place cursor on a cell within the query's data range and click on Properties within the Connections group, a window opens that is titled 'External Data Properties'. And furthermore, the 'Table Tools' menu opens up!!!

    Also, this new query creates an item in the 'Name Manager/Defined Names' group called 'Table_ExternalData_1' and not 'Query_from_MS_Access_Database' (which is what I want).

    I want to create a database query that pulls data from Access that does not create a table, but merely inserts the data into cells that I specify. I know this can be done because the query that is in place does this. Thanks.

  2. #2
    Registered User
    Join Date
    09-13-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: What's difference between a database query and a database table query?

    Hi,
    I dont fully understand the issue, but here are couple of ideas:

    -In Access 2007 or higher, you can create a query by doing Create (tab) > Query design. This query will simple pull data from a table so it is a virtual table.
    -The other item you mention is defining Name in Excel under Formulas tab I believe. This is simply used to help in formulas since you can use a whole region as a unit.

    Hope that helps.

    baghul

  3. #3
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: What's difference between a database query and a database table query?

    Thanks for replying. I have an Excel 2007 workbook that has a connection to an Access database. It is parameter driven such that if the parameter cell is changed, the workbook automatically uses that parameter to pull a different set of records from the Access database. This workbook was developed by someone else who is no longer around. What I do not understand is that this query does not seem to produce/update a table on the Excel sheet. it merely updates the query's data range. When I create a new query to pull different data from Access, I see no way to populate the Excel spreadsheet except by either introducing a Table, a pivotTable report or a pivotChart and pivotTable report.

    How does one create a query to pull data from Access into an Excel data range without creating a table; i.e., so that the data is simply inserted into the external data range? I tried to first create the query in Access, use it to build a temp table, and then import that table (with its query) into Excel. But that, too, creates a table.

  4. #4
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: What's difference between a database query and a database table query?

    This may seem unrelated to original post, but here is what is prompting the original post. I am trying to replace the existing query SQL statement in the existing connection with another SQL statement that pulls different Access data. I can't seem to find a way to do that because when I modify the existing SQL statement, selecting different table and fields, the data does not go into the original query data range. New columns are inserted and the report is no longer good. There's a lot of VBA code that handles the data in this query data range and the data is now organized differently. Sorry this is so confusing.

  5. #5
    Forum Contributor
    Join Date
    07-16-2007
    MS-Off Ver
    Excel 2003 and Excel 2016
    Posts
    178

    Re: What's difference between a database query and a database table query?

    Ok, I've answered my own question. As it turns out, the Excel workbook in question with its query connections was first created using Excel 2003. Creating new query connections in that version does not result in tables being introduced into the query data range. In Excel 2007, there appears to be no choice; i.e., tables are created.

  6. #6
    Registered User
    Join Date
    09-13-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: What's difference between a database query and a database table query?

    Ok I am glad it worked. I was going to ask you to share the actual VBA code but that is not necessary I think.

+ 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