Access SQL

css navigation by Css3Menu.com

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.

Sub Query image

© 2008-2024

Updated:  06/21/2024 07:42
This page added:  26 October 2008