Results 1 to 2 of 2
  1. #1
    arthura is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2009
    Posts
    8

    Question Alternative to Join Property???

    I am trying to combine the results of two queries into a new query. The problem I am having is that the two queries don't have the same IDs for the data.
    Example: Query 1 has IDs 1, 2, 4, 5 and Query 2 has IDs 1, 2, 3, 5 Each ID has a count value associated with it.

    I can't use a simple join query because Query 1 has IDs that Query 2 does not (4) and Query 2 has IDs that Query 1 does not (3). I can get three different results right now: IDs 1, 2, 5 or IDs 1, 2, 4, 5 or IDs 1, 2, 3, 5. I want to have results for IDs 1, 2, 3, 4, 5.

    How can I get the new query to use all of the IDs, not just the ones that Queries 1 and 2 have in common, just Query 1's or just Query 2's?

    Thanks!!!!

  2. #2
    thhui is offline Competent Performer
    Windows XP Access 2002 (version 10.0)
    Join Date
    Feb 2009
    Posts
    235
    Make a temporary table table3 by using union to get all ids from table1 and table2
    This temporary table would then has a common field id to all the other tables.
    Then you can use left join to join table1 and table2 data now.

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

Similar Threads

  1. Self Join in a Table
    By LornaM in forum Database Design
    Replies: 10
    Last Post: 05-06-2009, 10:29 AM
  2. Replies: 2
    Last Post: 02-28-2009, 03:31 PM
  3. Update with LEFT JOIN
    By mcarthey in forum Access
    Replies: 1
    Last Post: 08-27-2008, 10:49 AM
  4. Replies: 1
    Last Post: 08-10-2008, 01:09 AM
  5. 'On Open' Property
    By emilylu3 in forum Forms
    Replies: 1
    Last Post: 12-08-2005, 02:28 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