Hi all, is there a way to select records from two tables where the right hand side table may or may not have a matching record ? What I'm trying to do is produce a yearly report of sales per month per salesperson and if there are no entries for a given month I still want a record for the salesperson but showing a zero amount. I've looked at various *solutions* on the web but they all produce a null set which is not what I want. Null values for the sales is acceptable but I always want the salesperson name returned
// Table 1 ( Salesperson )
Salesperson
Pete
Paul
Mary
// Table2 ( Sales )
Salesperson. Sale date. SaleAmount
Pete. 01/01/2015. 1000
Pete. 01/01/2015. 2000
I would like the report to show
Salesperson. Month. Sumofmonthsales
Pete Jan. 3000
Pete. Feb. 0
etc... all through to December, and ditto for the rest of the salespersons. Hope this makes sense ( sorry about the formatting )
Regards,
Peter J. Kane
Pete