P
Peter Hibbs
Hi All
I have a query which returns all the company orders that are currently
outstanding, i.e. where OrderID is not null.
I have simplified the query a bit for this post -
SELECT tblCompany.Company, tblOrders.OrderDate, tblOrders.OrderID
FROM tblCompany INNER JOIN tblOrders ON tblCompany.ID = tblOrders.ID
GROUP BY tblCompany.Company, tblOrders.OrderDate, tblOrders.OrderID
HAVING (((tblOrders.OrderID) Is Not Null));
What I want to do is add a new table to the database (call it
tblExceptions with a field called CompanyName) which holds a list of
companies that would then be excluded from the list returned by the
query. The comparison would be between tblCompany.Company and
tblExceptions.CompanyName. Also I want to have a partial match using
the Like command so if the CompanyName field is set to British it
would exclude any companies that start with British, i.e. British Gas,
British Airways, etc.
Anyone know what mods I need to make to my query to accomplish this.
TIA.
Peter Hibbs.
I have a query which returns all the company orders that are currently
outstanding, i.e. where OrderID is not null.
I have simplified the query a bit for this post -
SELECT tblCompany.Company, tblOrders.OrderDate, tblOrders.OrderID
FROM tblCompany INNER JOIN tblOrders ON tblCompany.ID = tblOrders.ID
GROUP BY tblCompany.Company, tblOrders.OrderDate, tblOrders.OrderID
HAVING (((tblOrders.OrderID) Is Not Null));
What I want to do is add a new table to the database (call it
tblExceptions with a field called CompanyName) which holds a list of
companies that would then be excluded from the list returned by the
query. The comparison would be between tblCompany.Company and
tblExceptions.CompanyName. Also I want to have a partial match using
the Like command so if the CompanyName field is set to British it
would exclude any companies that start with British, i.e. British Gas,
British Airways, etc.
Anyone know what mods I need to make to my query to accomplish this.
TIA.
Peter Hibbs.