Results 1 to 3 of 3
  1. #1
    klcdn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    2

    Outer Join Select Query not working on all computers.


    Hello. I have a query that's working properly on my home PC (Access 2010) but does not return any results at my work PC (Access 2010 and Access 2013). Any help would be appreciated.

    The following query properly displays the 4th row of the Slave table on my home PC but not on my work PCs.

    Code:
       
    
    SELECT Slave.*, Slave.Primary, Slave.Secondary
    FROM Master RIGHT JOIN Slave ON (Master.Primary = Slave.Primary) AND (Master.Secondary = Slave.Secondary)
    WHERE (((Slave.Primary)<>[Master].[Primary]) AND ((Slave.Secondary)<>[Master].[Secondary]));
    Top Table is Slave Table, Bottom Table is Master Table:
    Primary Secondary Data
    A1 B2 AA
    A2 B2 BB
    A3 B3 CC
    A4 B4 DD

    Primary Secondary Data
    A1 B2 AA
    A2 B2 BB
    A3 B3 CC
    Last edited by klcdn; 08-26-2013 at 11:27 AM. Reason: incorrect query

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Try this:
    Code:
    SELECT Slave.Primary, Slave.Secondary, Slave.Data
    FROM Slave LEFT JOIN Master ON (Slave.Primary = Master.Primary) AND (Slave.Primary = Master.Primary)
    WHERE (((Master.Primary) Is Null) AND ((Master.Secondary) Is Null));

  3. #3
    klcdn is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    2
    Thanks, Alan. It's a cleaner query and works on all PC's.

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

Similar Threads

  1. Outer Join query with function not working
    By davebrads in forum Queries
    Replies: 4
    Last Post: 11-02-2011, 03:05 AM
  2. Outer Join Nested in Inner Join
    By Stevens7 in forum Queries
    Replies: 2
    Last Post: 10-19-2011, 01:34 PM
  3. Help creating outer join query
    By jobrien4 in forum Queries
    Replies: 5
    Last Post: 09-12-2011, 01:56 PM
  4. Union query (or Inner/Outer join?)
    By LilMissAttack in forum Queries
    Replies: 4
    Last Post: 10-23-2010, 12:36 AM
  5. Dynamic Query Outer Join Problem
    By mjack003 in forum Queries
    Replies: 0
    Last Post: 07-21-2006, 01:07 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