Saving SQL queries as stored queries
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 .
This opens the Save As dialog.
- In the box at the top of the dialog, enter a name for the stored query.
- In the Master Database tree, select the stored query group in which you want to save the stored query.
- Click .
Tips:
- To save changes to an existing stored query, use the SQL dialog. button on the
- To save a copy of an existing stored query, use the 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 Master Database tree).