Results 1 to 6 of 6
  1. #1
    cmiyatake is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    28

    Combining quieris


    How can I combine queries to gather common data from each query into a single datasheet? I have 3 queries that share common fields (i.e. IP address, hostname, role, issue). What I am seeking is to combine the three queries based on specific issues then combine them to see how many IP's share all or some of the issues.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,776
    I have 3 queries that share common fields (i.e. IP address, hostname, role, issue)
    Based in that comment, see if a UNION query will provide what you need.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    cmiyatake is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    28
    I'll give it a go

  4. #4
    cmiyatake is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    28
    found a gliche. I don't have SQL experience. Seems to require SQL notations to make a Union Query

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    found a gliche. I don't have SQL experience. Seems to require SQL notations to make a Union Query
    Actually, you don't. Just do the following.

    1. Set up your three queries so that they al return the same number of fields in the same order.
    2. Go to each query, change the View to "SQL View" and copy and paste the SQL code it shows you (this is the SQL Code of the query you just built!).
    3. Start a new query, switch to "SQL View", and paste the SQL code from the first query you copied.
    4. Delete the semi-colon ( at the end of the SQL code.
    5. At the end, type " UNION " (note the spaces on both sides of the word UNION)
    6. Paste the SQL Code from the second query you copied after that.
    7. Repeat steps 4-6 and add the code from the third query.
    8. View your results

    So, by doing that, you will be able to create a UNION query without having to knowi how to write SQL code.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

Please reply to this thread with any new information or opinions.

Similar Threads

  1. combining queries
    By WickidWe in forum Queries
    Replies: 1
    Last Post: 04-30-2014, 07:12 AM
  2. Replies: 14
    Last Post: 07-22-2013, 12:39 PM
  3. combining rows.. again
    By jerryb in forum Access
    Replies: 16
    Last Post: 05-03-2012, 08:34 PM
  4. Combining queries..
    By Anthony88 in forum Queries
    Replies: 4
    Last Post: 05-02-2012, 02:46 PM
  5. Combining first and last name
    By JRINC in forum Forms
    Replies: 3
    Last Post: 09-27-2011, 01:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums