Sub Query
A sub-query is an additional SELECT within another. In this case, we were looking for duplicate names within a large table.
SELECT DISTINCT FIPS55.State, FIPS55.CountyID, FIPS55.CountyName AS County INTO Counties
FROM FIPS55
WHERE (((FIPS55.CountyName) In (SELECT [CountyName] FROM [FIPS55] As Tmp GROUP BY [CountyName] HAVING Count(*)>0 )))
ORDER BY FIPS55.CountyName, FIPS55.State;
Access can build these automatically for you in the Analysis section or you can key them yourself.
|