Results 1 to 3 of 3
  1. #1
    psulions83 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    2

    Combining Data from two tables

    I am new to this forum.....I apologize if this issue has been previously covered. Any help is much appreciated.

    My problem is below.

    I have two tables. Table 1 has all of the lines contained in table 2.

    I need to combine the tables so that it shows me the matching records from 1 and 2 as well as the non matching in table 2.

    Below is my innerjoin but I am not sure how to get the rest of the records from table1 that do not match to table2

    SELECT TABLE1.ContractOwner,
    TABLE1.ContractName,
    TABLE1.ProductStartDate,
    TABLE1.ProductEndDate,
    TABLE1.DISC_PCT,
    [TABLE2].DISC_PCT_AMT
    FROM TABLE1 INNER JOIN [TABLE2]
    ON (TABLE1.ContractName = [TABLE2].ContractName)


    AND (TABLE1.ContractOwner = [Table2].ContractOwner)
    WHERE (((TABLE1.ProductStartDate)<=[TABLE2]![PRODENDDATE])
    AND ((TABLE1.ProductEndDate) >=[TABLE2]![PRODSTARTDATE]))

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    1 you can key the table so you don't get dupes, then add them both...
    Or
    2 make an OUTER join to get all items from both tables.

  3. #3
    psulions83 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    2
    ranman thank you for your reply.

    When I do LEFT JOIN i get the same results. OUTER join I get an error.

    Sorry my access skill level is low.

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

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2014, 04:00 PM
  2. Combining data from two or more dlookups
    By mahmud1180 in forum Access
    Replies: 6
    Last Post: 10-01-2014, 09:01 AM
  3. Combining data
    By joshynaresh in forum Access
    Replies: 1
    Last Post: 09-03-2013, 01:08 PM
  4. Replies: 6
    Last Post: 09-01-2013, 08:17 PM
  5. Replies: 5
    Last Post: 05-17-2013, 01:07 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