Modifying a query layer

Once added to ArcMap, the query and other properties that define the query layer can be modified. This is done on the Layer Properties dialog box.

When a spatial table stored in a database is added to ArcMap it will create a query layer with default properties as determined by the first row in the table. These properties may not be ideal, however. For example, a spatial table may have multiple geometry types for a single spatial attribute. A spatial table containing a collection of cities can be modeled in the database as both a point and a polygon geometry type. Feature layers in ArcGIS can only have a single geometry type, so the first row in the table provides the default geometry type property. In our example, if the first row in the spatial table containing cities data returns a point geometry, the feature layer for cities will be a point geometry type. If you would prefer to view the cities as polygons, you can modify the query layer properties and change the geometry type to polygon.

Other properties, such as a query layers dimensionality, spatial reference, SRID, and unique identifier field, are also determined by the first row returned from the spatial table. Similar to the geometry type, you can access these properties in the advanced options panel of the query layers dialog box and modify them.

  1. In the table of contents, right-click the query layer whose query you would like to modify.
  2. Click Properties to open the Properties dialog box.
  3. Click the Source tab.
  4. Click Change query.
  5. Modify the query in the Query text box.
  6. Click Validate.
  7. If you would like to modify any of the spatial properties of the query layer, such as its dimensionality, SRID, spatial reference, or geometry type, you can click the Show advanced options check box and click Next.
  8. Click Finish to close the dialog box.
  9. On the Layer Properties dialog box, click Apply to display the new result set for the query layer.
  10. Click OK to apply the changes and close the dialog box.

Related Topics