+ Reply to Thread
Results 1 to 4 of 4

multiple queries from same database

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    multiple queries from same database

    (I assume this is the best forum to discuss data connection issues in Excel? If a moderator thinks it belongs elsewhere, please let me know. Thanks)

    I'd like to create a workbook with about 100 identically formatted tables from the same mysql database. (The mysql table has around 200 tables in it).

    Each database table has identical labels.

    Here's an example schema:

    DB name: ospreytwice

    Table name: river

    Column Names:
    • Datestamp
    • River_Name
    • River_Length


    I've been playing around with the DB features all day but can't seem to find a way to configure Excel to make just one DB connection to obtain the values in these separate tables.

    Must I need to create a separate query (and connection) for each table? I don't think my db server would allow that. (Also, there are lot of other tables and formulas in the db so efficiency is important).

    Obviously I don't want to make the db connection info public, but if it will help you, then PM me and I can send the credentials so that you can see what I'm working with.

    Thanks!

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: multiple queries from same database

    You can use PowerQuery (Get&Transform) to connect DB into your workbook then create Reference to the basic Query as many as you wish and transformation possibilities of the References are limited only by your imagination.

  3. #3
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: multiple queries from same database

    Thanks Sandy. When you say "Reference" are you referring to the various lookup functions? I'd need to only load the first 300 rows of each table (the db has about 37,000 rows, used for other purposes).

    Also, I've recently updated to v 1711 and the data ribbon is a bit different than earlier versions. So upon reading your suggestion to use Get & Transform, I clicked and noticed this option to merge or combine queries (see image). You think that might be better?

    data merge append.png

    Thanks

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: multiple queries from same database

    No, click Queries and Connections (find Show Queries or something like that)
    On the right side you should see

    ref.jpg

    [text deleted - links added]
    Last edited by sandy666; 01-11-2018 at 08:28 PM.

+ 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: 14
    Last Post: 04-18-2017, 07:07 PM
  2. Database Sum using Multiple Criteria in Multiple Columns
    By wmitchell in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2008, 05:27 PM
  3. multiple items in database
    By Biff in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  4. [SOLVED] multiple items in database
    By Biff in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. [SOLVED] multiple items in database
    By Peter in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  6. multiple items in database
    By Peter in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. multiple items in database
    By Peter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-15-2005, 04:05 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