Greetings!
I have a database that tracks salesman daily activities, ie, calling on customers.
tblMaster holds information about one salesman and day
tblDetail holds information about each customer call that ocurred on a given day.
tblSalesman holds salesman information
tblCustomer holds customer information
tblAssign links customers to their assigned salesmen
What I'm trying to do is write a query that lists all customers who have NOT been called on by a given salesman within a range of dates. I'm more familiar with Oracle than I am with Access, and (ignoring the dates for simplicity) I'd do this in Oracle as follows:
Select CustID from tblAssign
where SalesmanID = 7
MINUS
select distinct tblDetail.CustID from tblMaster, tblDetail
where tblMaster.SalesmanID = 7
tblMaster.DayID = tblDetail.DayID
The idea here is that the first select statement lists all customers assigned to a salesman, the second lists all customers called on by that salesman, and the MINUS operator performs a set subtraction on the two result sets, returning the list of customers not called on. How would I do this in Access? From what I've been able to find, Access only supports UNION as a set operator.
Thanks in advance!
Dale Beitz
muza@myne.com
I have a database that tracks salesman daily activities, ie, calling on customers.
tblMaster holds information about one salesman and day
tblDetail holds information about each customer call that ocurred on a given day.
tblSalesman holds salesman information
tblCustomer holds customer information
tblAssign links customers to their assigned salesmen
What I'm trying to do is write a query that lists all customers who have NOT been called on by a given salesman within a range of dates. I'm more familiar with Oracle than I am with Access, and (ignoring the dates for simplicity) I'd do this in Oracle as follows:
Select CustID from tblAssign
where SalesmanID = 7
MINUS
select distinct tblDetail.CustID from tblMaster, tblDetail
where tblMaster.SalesmanID = 7
tblMaster.DayID = tblDetail.DayID
The idea here is that the first select statement lists all customers assigned to a salesman, the second lists all customers called on by that salesman, and the MINUS operator performs a set subtraction on the two result sets, returning the list of customers not called on. How would I do this in Access? From what I've been able to find, Access only supports UNION as a set operator.
Thanks in advance!
Dale Beitz
muza@myne.com