Saving and Reopening Queries

From DBArtisan
Jump to: navigation, search

Go Up to Using Query Builder

You can save and reopen queries in Query Builder. Saving a query saves the SQL Diagram, SQL Statement, and Query Builder Explorer view. Query Builder automatically checks for changes in your database or instance between the time you save the query and the time you reopen it. Query Builder prompts you to save any time you try to close Query Builder, or on application shutdown.

Query Builder runs Schema Change detection any time you set a query to execute, refresh the data, or open a saved query.

You can open multiple saved queries simultaneously.

Saving Queries

To save a query using standard Save and Save As functions, do the following:

  1. On the File menu, click Save or Save As.
    The Save As dialog box opens.
  2. In the File name box, type the name of the query.
    Note: By default, the product appends the.qbl extension to Query Builder files. If there is more than one Query Builder session in progress when you save, the file is further appended with an integer, for example.qbl2.
    Tip: You can save data in text (*.txt) and XML (*.xml) file formats.
  3. Click OK.
    The file is saved and the Save As dialog box closes.

Reopening Queries

You can open a query using standard Open functions. Query Builder displays the Query Builder diagram, statement and Query Builder Explorer Pane and it checks the instance or database for schema changes.

The Query Builder Schema Change Detection component checks for:

  • Renamed or dropped tables referenced in the query. Renamed tables that have been renamed are considered dropped.
  • Renamed or dropped columns referenced in the query. Renamed columns are considered dropped and inserted.
  • Columns added or reordered in tables referenced in the query.

If Query Builder detects a change, it opens the Schema Change Detected dialog box. The dialog box displays details of changes to your schema.

Query Builder opens an ISQL Editor with the last saved versions of the SQL statement.