Saving a Query

If you think you will want to use a query, save the query before you try to run it. Saving a query places the information in the system catalog tables, where it can be accessed later by you (and others if you save it as a shared query).

To save a query that has never been named before, or to save a query under a different name:

  1. From the File menu, click the Save As command.
    Note:


    Save button
    Click the Save button on the toolbar

    SQLWizard displays the Save As dialog box.

  2. Type a name for the query. You may want to change the location and AuthID for the query before you save it.
  3. Click the Options button to display the Set Query Options dialog box and type a comment or description for your query. This description will appear in the list of queries on the Catalog Browser dialog box.
  4. In the Query Type group box, choose to save your query as a Prompted Query (to be retrieved later into the Query Design window) or as an SQL Edit Query (to be retrieved later into the SQL Edit window or run as a batch SQL script file).
    Note:

    If you are saving a query from the SQL Edit window, and that query has been changed so that it no longer can be used in the Query Design window, you will only be able to save it as an SQL Edit Query, and not as a Prompted Query.

  5. In the Access group box, choose to make the query Private (available only to you) or Shared (available to other users on the XDB Server). With a Shared Query, the other users must have appropriate access authority to read the tables that the query uses.
  6. Click OK to exit back to the Save As dialog box.
  7. Click OK to save the query.

To resave a query:

Once a query is saved, you can use the Save command on the File menu or the Save button on the toolbar to resave any changes. The Save command does not prompt for a query name and does not provide access to the Set Query Options dialog box if the query has already been saved with a name.