Results 1 to 2 of 2
  1. #1
    scorpio is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    11

    Merging two queries of data using outer joins

    -I have two tables of data where I am trying to compare the difference in quantity and savings from month to month.


    -Both tables include item #, supplier, qty, cost.
    -Some of the item # and supplier fields are blank in either table, the data is different in lengths and is not consistent throughout.
    -Also some of the item #s are duplicated within a table but I need to include those because the supplier, qty and cost may be different.

    -I want not only data from both TableA and TableB when the key fields match, but also all the data from TableA and from TableB where they don't match. And a flag or indicator that tells me how they match.

    Below is an example of the results I would like to see:

    Table A Table B Flag

    Data table A only
    Data table A only
    Data Table A only
    Data Data table A & B
    Data Data Table A & B
    Data Data Table A & B
    Data table b only
    Data table b only
    Data table b only

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This might call for a UNION query.

    Create a UNION then join table B to the UNION with join type "Include all records from the {union query} and only those from Table B that match.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 15
    Last Post: 10-22-2012, 06:06 PM
  2. ambiguous outer joins
    By libraccess in forum Queries
    Replies: 5
    Last Post: 03-31-2012, 05:41 PM
  3. LEFT/RIGHT/OUTER JOINS in a set of subqueries
    By luckycharms in forum Queries
    Replies: 1
    Last Post: 08-01-2011, 05:06 PM
  4. Multiple outer joins - error message
    By Lipi in forum Queries
    Replies: 1
    Last Post: 09-16-2010, 02:44 PM
  5. Merging 3 queries into one report
    By terricritch in forum Reports
    Replies: 2
    Last Post: 06-23-2010, 02:38 AM

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