SQL queries can be saved for reuse. The SQL queries are saved as a stored query, a type of database object. Stored queries are stored within stored query groups.
To save a SQL query as a new stored query
- Make sure that a stored query group exists in the model group tree.
- Create a SQL query.
- On the SQL dialog, click Save As.
This opens the Save As dialog.
- In the box at the top of the dialog, enter a name for the stored query.
- In the Database tree, select the stored query group in which you want to save the stored query.
- Click Save.
Tips:
- To save changes to an existing stored query, use the Save button on the SQL dialog.
- To save a copy of an existing stored query, use the Save As button, giving the stored query another name and/or location.
- Once a query has been saved, it can be run by dragging the stored query object from the Model Group window or Explorer window into the GeoPlan window.
- Multiple queries can be run by dragging the stored query group into the GeoPlan window. All stored queries in the group will be applied in alphabetical order (that is, the order that the queries appear in the Database tree).