G
Guest
Hello,
I have three tables, one is Customer, one is Item and one is Sales.
Customers have custid which is uniqe, Items have itemid which is uniqe and
Sales has saleid which is also unique. They also have the usual fields (name
address, price etc) Customer and Sales are linked on Custid and Sale and Item
are linked on Itemid as they can only buy one item at a time.
I want to get a list of every customer who has bought a particular item, but
not this other one, for example:
Each customer who bought Paper 1 over 6 months ago, but has not yet bought
Paper 2.
Paper 1 or Paper 2 will be in Item.Name but I can type in the itemid. I just
need to find every custid that has itemid 1 but not itemid 2 in the linked
fields.
Any help would be greatly appreciated
Many thanks
James
I have three tables, one is Customer, one is Item and one is Sales.
Customers have custid which is uniqe, Items have itemid which is uniqe and
Sales has saleid which is also unique. They also have the usual fields (name
address, price etc) Customer and Sales are linked on Custid and Sale and Item
are linked on Itemid as they can only buy one item at a time.
I want to get a list of every customer who has bought a particular item, but
not this other one, for example:
Each customer who bought Paper 1 over 6 months ago, but has not yet bought
Paper 2.
Paper 1 or Paper 2 will be in Item.Name but I can type in the itemid. I just
need to find every custid that has itemid 1 but not itemid 2 in the linked
fields.
Any help would be greatly appreciated
Many thanks
James