O
OssieMac
I have the following queries that count records matching particular criteria.
One counts ProdPrefix="C" and
the other counts ProdPrefix="M".
Output is in 2 columns for each query as follows
DonorName ProdPrefixC
DonorName ProdPrefixM
How can I put the whole lot together to get an output with 3 columns as
follows
DonorName ProdPrefixC ProdPrefixM
SQL generated in query design for each query.
SELECT DonatedProducts.DonorName, Count(DonatedProducts.ProdPrefix) AS
CountPrefixC
FROM DonatedProducts
WHERE (((DonatedProducts.ProdPrefix)="C"))
GROUP BY DonatedProducts.DonorName;
SELECT DonatedProducts.DonorName, Count(DonatedProducts.ProdPrefix) AS
CountPrefixM
FROM DonatedProducts
WHERE (((DonatedProducts.ProdPrefix)="M"))
GROUP BY DonatedProducts.DonorName;
One counts ProdPrefix="C" and
the other counts ProdPrefix="M".
Output is in 2 columns for each query as follows
DonorName ProdPrefixC
DonorName ProdPrefixM
How can I put the whole lot together to get an output with 3 columns as
follows
DonorName ProdPrefixC ProdPrefixM
SQL generated in query design for each query.
SELECT DonatedProducts.DonorName, Count(DonatedProducts.ProdPrefix) AS
CountPrefixC
FROM DonatedProducts
WHERE (((DonatedProducts.ProdPrefix)="C"))
GROUP BY DonatedProducts.DonorName;
SELECT DonatedProducts.DonorName, Count(DonatedProducts.ProdPrefix) AS
CountPrefixM
FROM DonatedProducts
WHERE (((DonatedProducts.ProdPrefix)="M"))
GROUP BY DonatedProducts.DonorName;