G
Guest
I'm new to newsgroups, I've been struggling with this problem.
Any help appreciated.
Orders is a distinct list of Customers + Stock Numbers showing what they've
ordered. ReducedStockList are priority items.
I'm trying find out stock numbers from ReducedStockList that Customers
haven't ordered i.e not in the Orders table
The query below works with an Orders table of a few hundred rows but
doesn't work with > 10000 rows. Suspect problem is with the use of 'not in'
SELECT DISTINCT a.[Branch Ac], b.CatNumber
FROM Orders AS a, ReducedStockList AS b
WHERE (((b.CatNumber) Not In (select catnumber from Orders where [Branch Ac]
= a.[Branch Ac])))
ORDER BY a.[Branch Ac], b.CatNumber;
can anyone help?
Thanks
Any help appreciated.
Orders is a distinct list of Customers + Stock Numbers showing what they've
ordered. ReducedStockList are priority items.
I'm trying find out stock numbers from ReducedStockList that Customers
haven't ordered i.e not in the Orders table
The query below works with an Orders table of a few hundred rows but
doesn't work with > 10000 rows. Suspect problem is with the use of 'not in'
SELECT DISTINCT a.[Branch Ac], b.CatNumber
FROM Orders AS a, ReducedStockList AS b
WHERE (((b.CatNumber) Not In (select catnumber from Orders where [Branch Ac]
= a.[Branch Ac])))
ORDER BY a.[Branch Ac], b.CatNumber;
can anyone help?
Thanks