I am trying to find out what is wrong with the following code:
Expand|Select|Wrap|Line Numbers
- SELECT Investor.Company, Investor.ID, Investor.Country
- FROM Investor
- WHERE ((( Investor.Company) In (
- SELECT [Company]
- FROM [Investor] As Tmp GROUP BY Left([Company],3)
- HAVING Count(*)>1
- And Left([Company],3) =Left([Investor].[Company],3) )));
The message I keep getting is:
You tried to execute a query that does not include the specified expression "Company" as part of an aggregate function.
Does anyone know what I am doing wrong and what would be the solution?
Thank you!