Need help figuring out which SQL will work...
I have the following SQL code:
SELECT NPP2.PID AS Others,
Sum(NPP2.Total) AS Total,
Sum(NPP2.AP) AS AP,
Sum(NPP2.EN) AS EN,
Sum(NPP2.CN) AS CN,
Sum(NPP2.TD) AS TD
FROM GroupedPartners, NPP2
WHERE ((NPP2.PID) In (GroupedPartners.[Grouped Partners]))
GROUP BY NPP2.PID;
This query works fine. But now I need a query that will pull records from NPP2 with a PID that is not matching anything on GroupedPartners.
I've tried:
WHERE ((NPP2.PID) NOT In (GroupedPartners.[Grouped Partners]))
but the result shows me all the records and doesn't exclude the PIDs which matched up GroupedPartners.
Thanks for any help!
I have the following SQL code:
SELECT NPP2.PID AS Others,
Sum(NPP2.Total) AS Total,
Sum(NPP2.AP) AS AP,
Sum(NPP2.EN) AS EN,
Sum(NPP2.CN) AS CN,
Sum(NPP2.TD) AS TD
FROM GroupedPartners, NPP2
WHERE ((NPP2.PID) In (GroupedPartners.[Grouped Partners]))
GROUP BY NPP2.PID;
This query works fine. But now I need a query that will pull records from NPP2 with a PID that is not matching anything on GroupedPartners.
I've tried:
WHERE ((NPP2.PID) NOT In (GroupedPartners.[Grouped Partners]))
but the result shows me all the records and doesn't exclude the PIDs which matched up GroupedPartners.
Thanks for any help!