Database Toolbox    

Getting Started with the Visual Query Builder

The Visual Query Builder (VQB) is an easy-to-use graphical user interface for retrieving data from your database. With the VQB, you build queries to retrieve data by selecting information from lists rather than by entering MATLAB functions. The VQB retrieves the data from a database and puts it in a MATLAB cell array, structure, or numeric matrix so you can process the data using the MATLAB suite of functions. With the VQB, you can display information retrieved as cell arrays in relational tables, reports, and charts.

Before You Start

Before using the Visual Query Builder, set up a data source. For instructions, see Setting Up a Data Source.

Note that if you use JDBC drivers on a Windows platform, you cannot use the Visual Query Builder.

Starting the Visual Query Builder

To start the Visual Query Builder interface, type

at the MATLAB prompt. The Visual Query Builder opens. When you start the VQB, all fields except the Data source are blank. You can also start the interface using the Start menu or Launch Pad in the MATLAB desktop.

Summary of Steps to Use the Visual Query Builder

Detailed instructions to perform these steps are in subsequent sections. Required steps are marked with an *.

1*
Select the data source from which you want to import data.
2*
Select the tables that contain the data you want to import.
3*
Select the fields whose data you want to import.
4
Use advanced query options to refine the query.
5
View the SQL statement.
6*
Assign a MATLAB workspace variable for the results.
7
Set preferences for data retrieval using the Query menu
8*
Execute the query.
9
View the resulting data in the MATLAB Command Window.
10
View results in table, chart, and report formats using the Display menu.
11
Save and load queries using the Query menu.

Quitting the Visual Query Builder

To quit using the Visual Query Builder, select Exit from the Query menu, or click the close box.


  Visual Query Builder When to Use the Visual Query Builder