Results 1 to 4 of 4
  1. #1
    BrianFawcett is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    7

    Query with combination of fields in one table and not another

    I am trying to create a query which I am going to use to build a report. What I need to do is create a condition in the query where i want to return the records for one Table (RFQ Sent) where there are not a corresponding combination of two field (Supplier and Part) in a second table (RFQ received). Can anyone help me out?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    try left join query:

    select a.* from [rfq sent] as a left join [rfq received] as b on a.supplier=b.supplier and a.part=b.par where b.part is null

  3. #3
    BrianFawcett is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2010
    Posts
    7
    Isn't a Left Join only going to include the records from tbl_RFQSent where the two fields are contained in tbl_RFQReceived?

    I want to include the records where the combination of Part and Supplier for each specific record in tblRFQSent is not in tbl_RFQReceived

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    you try, then you know.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-10-2010, 04:36 PM
  2. Replies: 1
    Last Post: 05-21-2010, 02:22 PM
  3. Replies: 5
    Last Post: 03-20-2010, 08:30 AM
  4. Replies: 1
    Last Post: 05-20-2009, 06:15 AM
  5. Prevent Duplicate Values on Combination of Two Fields
    By LornaM in forum Database Design
    Replies: 8
    Last Post: 05-05-2009, 11:16 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