I am creating a query. For my data sources, I am using two tables. I am trying to figure out the best way to link these two so that I can return any instances in the first table, that do not appear in the second table (like a LEFT OUTER Join without the matches).
The first table has two fields: subCompany and subEmp. Each employee appears only once. A company may appear more than once since a company can have more than one employee associated with it. No primary key designated (not sure if it is really needed).
The second table has the following fields: subCompany, subEmp, invoiceNo, invoiceDate, subHours, billRate and invAmount.
The first table lists all possible subcontractors that we can receive invoices from. The second table contains invoicing data received from the subcontractors. I plan on using a parameter query to prompt the user to specify a month, then when the query executes, it will list all subcontractors and subEmployees (from table 1) that we have NOT received an invoice from.
What is the best way to approach this? Should I use Primary keys? If I use a LEFT OUTER Join, I will get all records from table1, plus any records that match in table2 But I don't want that. I only want instances in table 1 that do not match records in table 2 (for the month the user chooses in the parameter query).