User`s guide

5 Using Visual Query Builder
5-48
4
Click OK.
The HAVING Clauses dialog box closes. The SQL statement field in the VQB dialog
box reflects the specified Having clause.
5
Assign a MATLAB workspace variable C, and click Execute to run the query.
C =
[3000] [2400]
[5000] [3500]
Compare these results to those in “Displaying Results in a Specified Order” on page
5-42.
Creating Subqueries for Values from Multiple Tables
Use the Where feature in Advanced query options to create subqueries. Creating
subqueries in this way is referred to as nested SQL.
This example uses basic.qry, which you created by selecting Query > Save and saving
your query as basic.qry in the File name field.
The salesVolume table has sales volumes and stock number fields, but no product
description field. The productTable has product description and stock number fields,
but no sales volumes. This example retrieves the stock number for the product whose
description is Building Blocks from the productTable table. It then gets the sales
volume values for that stock number from the salesVolume table.