SQL Attribute Query Example

In this paper, an example of querying the distribution of countries with a population of more than 100 million in 1994 and the color of the map is green (4) is given to illustrate how to query attributes.

Step 1: Open the World Data Workspace: World. Smwu, with the Query Data set as World.

Step 2: Select SQL Query in the Spatial Analysis tab > Query group to pop up the SQL Query "dialog box.

Step 3: Make the following settings in the "SQL Query" dialog box: Query mode: Query Spatial and Attributes; Query field World. *; Query Conditions World. POP _ 1994 > 100000000 AND World. COLOR _ MAP Like "4; Check the Highlight in Map in Show Results; Save Results. See the following figure:

Step 4: Browse the Search Result.

Map will automatically switch to "Associated Browse" mode, and the property sheets of World Map and Search Result will be displayed side by side; Meanwhile, the Search Result will be highlighted in the World Map. Select a country in the attribute table, and the Map will automatically locate the country, as shown in the following figure.

Remark

  1. It is known that the field storing the color of the map of each country is World. COLOR _ MAP, the field storing the population information of 1994 is World. POP _ 1994, and the two conditions come into play at the same time, connected by AND.
  2. When querying, the selected Dataset in the "Select Dataset:" list box must be the Dataset of this query, otherwise the Application will prompt that the query fails.
  3. If the corresponding Geometry is not highlighted in the Map after we select a record in the Result Table, it may be because we set the visible scale range of the layer for the sake of beauty when we create the Map. At this time, you need to clear the setting of the visible scale range of the layer first. For the operation method, please refer to Set Visible Scale .