HOW TO
Note: This article applies to retired ArcGIS versions 9.x and 10.0. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.
It is recommended to migrate to ArcGIS Pro. See See Migrate from ArcMap to ArcGIS Pro for more information.
In den folgenden Anweisungen wird beschrieben, wie Sie mithilfe von Unterabfragen im SQL-Ausdruck des Fensters "Nach Attributen auswählen" auf Aggregationsfunktionen wie MIN und MAX zugreifen. Ein entsprechendes Beispiel ist eine Abfrage, die das maximale Datum in einem Datumsfeld auswählt.
Verwenden Sie GROUP BY-Unterabfrageklauseln, um Werte aus Aggregationsfunktionen für Wertesätze zurückzugeben.
Note: Coverages, shapefiles, and other non geodatabase file-based data sources do not support subqueries. Subqueries performed on a versioned ArcSDE feature class that has been registered without the option to move edits to base do not return features stored in the delta tables. File geodatabases provide limited support for subqueries explained in this article, while personal and ArcSDE geodatabases provide full support. Refer to the database management system (DBMS) documentation for information on the full set of subquery capabilities of personal and ArcSDE geodatabases.
Verwenden Sie die folgenden Beispiele mit Geodatabase-Feature-Classes und -Tabellen, ArcSDE-Feature-Classes und -Tabellen sowie Access-Tabellen aus einer OLE-DB-Verbindung:
<date> = (SELECT MAX(date) FROM <table_name>)
<date> = (SELECT MIN(date) FROM <table_name>)
<date> = (SELECT MAX(date) FROM <table_name> GROUP BY <group_ID>)
<date> = (SELECT MIN(date) FROM <table_name> GROUP BY <group_ID>)
Note: Query expressions in ArcGIS adhere to standard SQL expressions. The SQL syntax used in an expression differs depending on the data source. Each data source has its own variant of SQL, which are referred to as SQL dialects. See: SQL reference for query expressions used in ArcGIS
Artikel-ID: 000008936
Unterstützung durch ArcGIS-Experten anfordern
Esri Support App herunterladen