Adding Columns Between Two Different Tables

V

Vylent Fyre

I'm trying to get a sum of two columns in two different tables. My problem
is that if the Salesperson Code isn't in both tables, it will not do the sum
expression. For example:

Invoices Over 60 Days Invoices to Reserve
Salesperson Code Salesperson Code
310 310
311 311
312 313
313 314

Because the Invoices to Reserve table Salesperson Code does not have the
312, it will not do a sum of the calculated expressions I've created. How
can I get it to where it'll put a 0 and add the Invoices Over 60 Days even if
the Invoices to Reserve Salesperson code isn't there?

I'm sure this is possible but my brain is foggy! (Happy Friday!!) :)
 
M

Marshall Barton

Vylent said:
I'm trying to get a sum of two columns in two different tables. My problem
is that if the Salesperson Code isn't in both tables, it will not do the sum
expression. For example:

Invoices Over 60 Days Invoices to Reserve
Salesperson Code Salesperson Code
310 310
311 311
312 313
313 314

Because the Invoices to Reserve table Salesperson Code does not have the
312, it will not do a sum of the calculated expressions I've created. How
can I get it to where it'll put a 0 and add the Invoices Over 60 Days even if
the Invoices to Reserve Salesperson code isn't there?


In the query design window, right click on the line between
the two tables, then select Join Pproperties from the little
pop up menu. In the Join Properties window, select the
option for Show All records from table Invoices Over 60 Days
table and any matching records from the Invoices to Reserve
table.

That will change the query from an INNER JOIN to a LEFT JOIN
(or maybe a Right Join?)
 
Top