Still returns 0.
I managed to do it by adopting IanWaterman's code.
DELETE tbProdDesc FROM
(
SELECT p.* FROM tbProdDesc p
left outer join
(SELECT [Stock Code] FROM tbQuotePart UNION
SELECT [Stock Code] FROM tbInvoicePart UNION
SELECT [Stock Code] FROM tbSOPart UNION
SELECT...
IanWaterman - Your select statement works but I need to turn it into a Delete statement, and I'm not sure of the syntax changes I would need when deleting with a joined query.
PHV - Your select statement still brings back 0, when it should be 28000 ish. There are no rows with Null [Stock...
Hi,
I'm having a bit of trouble with a SELECT query.
I'm trying to select a count of the number of products which are not part of Invoices, Sales Orders etc.
The code I have so far is....
SELECT COUNT(*) FROM tbProdDesc WHERE
[Stock Code] NOT IN
(SELECT [Stock Code] FROM tbQuotePart UNION...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.