Database Toolbox    

Viewing Query Results

After running a query in the Visual Query Builder, you can view the retrieved data in the MATLAB Command Window, as described in step 7 of Creating, Running, and Saving a Query. In addition, the VQB Display menu provides additional options for viewing data:

To use these Display menu items, the data return format preference must be set to cellarray.

To use the saved query from the earlier example, basic.qry, with the Display menu examples in this section, change the preference, and load and run the query:

  1. Select Query -> Preferences.
  2. In the Preferences dialog box, change the Data return format to cellarray and click OK.
  3. Select Query -> Load.
  4. In the Load SQL Statement dialog box, select the File name, basic.qry. and click Open.
  5. In the VQB, type a value for the MATLAB workspace variable, for example, A, and then click Execute.

  Clearing Variables from the Data Area Relational Display of Data