CT Witter
MrExcel MVP
- Joined
- Jul 7, 2002
- Messages
- 1,212
I was wondering if someone could help me to combine these 2 queries into 1?
First query : named qryByCat2
SELECT DISTINCT [Vendor List 1].[Account Desc], [Vendor List 1].[Vendor#]
FROM [Vendor List 1]
GROUP BY [Vendor List 1].[Account Desc], [Vendor List 1].[Vendor#];
Second Query: named qryByCat3
SELECT qryByCat2.[Account Desc], Count(qryByCat2.[Vendor#]) AS [CountOfVendor#]
FROM qryByCat2
GROUP BY qryByCat2.[Account Desc];
Do I need to union? Thanks!
CT
First query : named qryByCat2
SELECT DISTINCT [Vendor List 1].[Account Desc], [Vendor List 1].[Vendor#]
FROM [Vendor List 1]
GROUP BY [Vendor List 1].[Account Desc], [Vendor List 1].[Vendor#];
Second Query: named qryByCat3
SELECT qryByCat2.[Account Desc], Count(qryByCat2.[Vendor#]) AS [CountOfVendor#]
FROM qryByCat2
GROUP BY qryByCat2.[Account Desc];
Do I need to union? Thanks!
CT