Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Hello June7, one other question that occurred to me on this: does the query use the ID of the primary table as the matcher. i.e. how does it know which two rows to compare?
    Thanks!

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I have done that with the wizard. No idea why you can't.

    Once you have the query built and saved with one match, use the query designer to add other fields to the grid and apply Is Null parameter.
    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.

  3. #18
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    Ok well I was able to manually add them through the query designer however I'm not seeing the expected results. I'd like to compare Clicks, Impressions and Cost in the two tables, they don't match, but I'm not seeing them show up in the output. Also, could you comment about whether the query is using ID to link the two tables for compare?

    Thanks!
    Attached Files Attached Files

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Linking on the ID fields is meaningless because they are both autonumber.

    I used the wizard and this is the SQL:

    SELECT [Paid Media Output].Website
    FROM [Paid Media Output] LEFT JOIN [SEM Portfolio Report] ON [Paid Media Output].[Cost] = [SEM Portfolio Report].[Pub Cost]
    WHERE ((([SEM Portfolio Report].[Pub Cost]) Is Null));

    The query shows:
    Website
    Website1.com
    Website2.com
    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.

  5. #20
    accessmatt is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    199
    June7, 2 questions:

    From this query, it doesn't look like you're comparing on 3 but rather only 1 field (Cost).



    Quote Originally Posted by June7 View Post
    Linking on the ID fields is meaningless because they are both autonumber.

    I used the wizard and this is the SQL:

    SELECT [Paid Media Output].Website
    FROM [Paid Media Output] LEFT JOIN [SEM Portfolio Report] ON [Paid Media Output].[Cost] = [SEM Portfolio Report].[Pub Cost]
    WHERE ((([SEM Portfolio Report].[Pub Cost]) Is Null));

    The query shows:
    Website
    Website1.com
    Website2.com

  6. #21
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Sorry, that makes me recall another reason why I avoid the wizards. You were right, the wizard only matches on the last pair that is selected. So I built the query manually. See if this gets what you want.


    SELECT [Paid Media Output].Website
    FROM [Paid Media Output] LEFT JOIN [SEM Portfolio Report] ON ([Paid Media Output].Clicks = [SEM Portfolio Report].Clicks) AND ([Paid Media Output].Impressions = [SEM Portfolio Report].Impr) AND ([Paid Media Output].[Cost] = [SEM Portfolio Report].[Pub Cost])
    WHERE ((([SEM Portfolio Report].[Pub Cost]) Is Null)) OR ((([SEM Portfolio Report].Impr) Is Null)) OR ((([SEM Portfolio Report].Clicks) Is Null));

    or

    SELECT [Paid Media Output].Website
    FROM [Paid Media Output] LEFT JOIN [SEM Portfolio Report] ON [Paid Media Output].Website = [SEM Portfolio Report].Website
    WHERE ((([Paid Media Output].Cost)<>[SEM Portfolio Report].[Pub Cost])) OR ((([Paid Media Output].Impressions)<>[SEM Portfolio Report].[Impr])) OR ((([Paid Media Output].Clicks)<>[SEM Portfolio Report].[Clicks]));
    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.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

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