Database Toolbox | ![]() ![]() |
Creating, Running, and Saving a Query
Topics covered in this section are
Building and Executing a Query
Build and run a query to import data from your database into MATLAB. Then save the query for use again later.
Before You Start. Before using the VQB, set up a data source--see Setting Up a Data Source. The examples here use the dbtoolboxdemo
data source.
To Start. To open the VQB, in the Command Window type
In the VQB, perform these steps to create and run a query:
dbtoolboxdemo
, which is the data source for the tutorial
database.
After selecting a data source, the Tables in that data source appears.
salesVolume
.
Note: Using the Visual Query Builder, you cannot access tables whose names include spaces. You can instead use Database Toolbox functions.
StockNumber
, January
, February
, and March
.
A
.
A
. In the Data area, information about the query result appears.
A
in the Data section. The contents of A
is displayed in the Command Window. Another way to see the contents of A
is to type A
in the Command Window.
![]() | Online Help for the Visual Query Builder | Saving a Query | ![]() |