SQL queries can be used to:
- Select network objects according to criteria specified in the queries
- Update network object data fields
Objects can be selected on network object criteria and also by geographic location relative to other layer (GIS, network, or background network) objects. The selected objects can be viewed as a grid or used in other network operations. SQL queries can also be used in the creation of customised reports.
To select objects using a query:
- Choose SQL select from the Selection menu, or click the button from the Selection Toolbar.
- Create any variables you will need in the SQL query, using the User Macros tab.
- Click on the SQL Query tab to:
- choose the type of object from which you wish to make your selection
- choose the spatial search type and layer type to be used in the search
- build the query
- Use the buttons at the bottom of the dialog to test, apply, run, save or close the query. See SQL Dialog for details.
Click the Save As button on the SQL Dialog to save the query in the database tree. Once the query has been saved, it can be run by dragging the Stored Query object from the Explorer Window into the GeoPlan Window.
Multiple queries can be run by dragging the Model Group containing the queries into the GeoPlan Window. All Stored Queries in the group will be applied in alphabetical order.
If both spatial search select options and object type select options are defined in the query, the spatial search is carried out first; the main query using object type criteria is then carried out on the results of the spatial search.
For further details on using SQL Queries, see the Using SQL section.