Results 1 to 2 of 2
  1. #1
    anunat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    19

    Join Question

    I have two tables: Focus and Comp



    I want to join these two tables based on field: DwId

    For this example, I made a Comp table that has 3 DwId's not present in the Focus table.

    When I run the below statement, I am not getting the 3 records only present in the Comp table in the result.

    SELECT Focus.DwId, Focus.PRD_May2012, Focus.PRD_May2012 - Comp.PRD_May2012 AS PRD_DiffMay2012
    FROM Focus RIGHT JOIN Comp ON Focus.DwId = Comp.DwId

    What am I doing wrong here?

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    You're doing a right join instead of a left join.

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

Similar Threads

  1. inner join question
    By silverxx12 in forum Queries
    Replies: 5
    Last Post: 02-15-2012, 11:56 AM
  2. Outer Join Nested in Inner Join
    By Stevens7 in forum Queries
    Replies: 2
    Last Post: 10-19-2011, 01:34 PM
  3. SQL - Inner Join
    By springboardjg in forum Queries
    Replies: 1
    Last Post: 05-12-2011, 05:10 AM
  4. Help with right join
    By usa_dreamer2002 in forum Queries
    Replies: 3
    Last Post: 02-25-2011, 04:47 PM
  5. Interesting and Urgent Join Query Question
    By pinecrest515 in forum Queries
    Replies: 8
    Last Post: 01-26-2011, 11:21 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