Database Toolbox    

Saving a Query

After building a query in the VQB, you can save it for later use. To save a query:

  1. Select Save from the Query menu.

    The Save SQL Statement dialog box appears.

  1. Complete the File name field and click Save. For the example, type basic as the filename.

    The query is saved with a .qry extension.

The MATLAB workspace variable name you assigned for the query results and the query preferences are not saved as part of the query.

Using a Saved Query

To use a saved query:

  1. Select Load from the Query menu.

    The Load SQL Statement dialog box appears.

  1. Provide the name of the query you want to load and click Open. For the example, select basic.qry.

    The VQB fields reflect the values for the saved query.

  1. Assign a MATLAB workspace variable and click Execute to run the query.

 Using Retrieved Data in MATLAB Clearing Variables from the Data Area