Results 1 to 2 of 2
  1. #1
    elmister is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    12

    Exclamation Comparing two tables.

    Hi, I need to create a query that will compare both tables and just send out the records that dont match to a report.



    Table1 asset#,Serial#
    Table2 asset#,Serial#


    query that checks that in Table1 the asset OR the Serial match the what is in Table2. and if it does not find a match to send it to a report.

    please help. i have tried everything.


    thank you for your time.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    try unionizing it with 2 left join queries.

    Code:
    select * from table1 left join table2 on 
    
    (table1.asset = table2.asset)
    
    UNION
    
    select * from table1 left join table2 on 
    
    (table1.serial = table2.serial)
    I wonder if that would work...it does in theory, I know that. But if Access likes it, that's the question!

    UNION queries require the same amount of fields from both statements.

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