User`s guide
5 Using Visual Query Builder
5-52
e
Click Execute.
f
Type P at the prompt in the Command Window to view the results.
The results show that item 400345 has the product description Building
Blocks. In the next section, you create a query that includes product
description in the results.
Note: You can include only one subquery in a query using VQB; you can include multiple
subqueries using Database Toolbox functions.
Creating Queries That Include Results from Multiple Tables
A query whose results include values from multiple tables is said to perform a join
operation in SQL.
This example retrieves sales volumes by product description. It is like the one in
“Creating Subqueries for Values from Multiple Tables” on page 5-48, but this
example creates a query that returns product description rather than stock
number.
The salesVolume table has sales volume and stock number fields, but no product
description field. The productTable table has product description and stock
number fields, but no sales volume field. To create a query that retrieves data from
both tables and equates the stock number from productTable with the stock number
from salesVolume: