SQL Dialog - SQL Page
The SQL tab on the SQL dialog lets you build your SQL query.
A simplified version of the tab, without the spatial search settings is displayed when:
- Editing SQL expressions for use in Themes
- Editing SQL expressions for use when exporting 2D element results to GIS
- Adding SQL expressions to TVD connectors
If you are familiar with SQL queries, you can type in a query manually (using the Field Type and the Field boxes to insert the fields you need). Details of the SQL statements allowed in InfoWorks ICM can be found in the SQL Syntax topic.
Alternatively, click on the Builder >> button. This displays a set of buttons representing the operators that you can include in your query.
You can represent constant values in the query by typing the name of a user macro instead of a value. User macros are highlighted in blue.
For information on the dialog buttons, see SQL Dialog.
Field |
Description |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Object Type |
Dropdown list of network objects |
||||||||||||||||||
Field Type
|
Dropdown list of data fields applicable to network object selected in the Object Type box. Selecting a Field Type from the list defines which fields will be available in the Field dropdown list :
Connected objects e.g. us_links and array fields e.g. |
||||||||||||||||||
Field |
Dropdown list of data fields applicable to parameter selected in the Field Type box. Selecting a Field from the list inserts the field in the query. When Field Type is set to <normal>, fields related to the selected Object Type will be displayed. In addition the following will be available:
|
||||||||||||||||||
Display Flag Fields check box |
Check the Display Flag Fields box to include flag fields in the Field dropdown list. |
||||||||||||||||||
Display precision |
The Display precision dropdown box is only displayed when editing theme SQL expressions. Select the number of decimal places to be shown when displaying the results of the SQL expression in labels. |
||||||||||||||||||
Search Type |
Dropdown list of available spatial search types for use with layers currently loaded in the GeoPlan. The available options are:
|
||||||||||||||||||
Layer Type |
The Layer Type option becomes available when a spatial Search Type is selected.
|
||||||||||||||||||
Distance |
The Distance option becomes available when Search Type Distance is selected. Network objects within the specified Distance of a layer line or polygon area will be selected. |
||||||||||||||||||
Layer |
The Layer option becomes available when a spatial Search Type is selected. Dropdown list of layers currently loaded in the GeoPlan (only those layers loaded in the GeoPlan Window before the SQL dialog is opened will be listed). |
||||||||||||||||||
Field |
The Field option becomes available when a spatial Search Type is selected. Dropdown list of fields within the Layer selected in the Layer box. Selecting a spatial search Field from the list inserts the field in the query. |
||||||||||||||||||
Builder |
Click the Builder >> button to display a set of buttons representing the operators that can be included in the query. Click the Finish << button to close the builder. |