Use the Query window to create a query.
- Choose from the HPL main window.
The Query window appears, as Figure 1 shows.
- Click Create in the Selection
Type group.
- Choose a name for your query and type it in the Query text
box.
- In the Database text box, type the
name of the database that contains the tables from which you want
to extract data. Or, click the down arrow to select from a database
selection list.
The following figure shows the
Query window
with the
Query text box completed and
stores_demo selected
from the selection list.
Figure 1. The Query window
- Click OK.
The Query-Definition window appears,
as Figure 2 shows. The name
that you chose for your query appears in the title bar.
- Type your query in the Select, From,
and Where text boxes.
The following
figure shows the following simple query of the
customer table
of the
stores_demo database:
SELECT customer.fname, customer.lname,
customer.zipcode
FROM customer
WHERE zipcode > 50000
Figure 2. The Query-Definition window
If you prefer, you can type the entire query into the Select text
box. If you later edit the query, ipload divides
the query into SELECT, FROM, and WHERE clauses.
- Click OK to save the query and return
to the Query window.
The query
that you just created now appears in the Query list
box at the right side of the
Query window.
- Click Cancel to return to the HPL
main window.