Home | Previous Page | Next Page   Defining Queries >

Creating a Query

Use the Query window to create a new query.

To create a query
  1. Choose Components > Query from the HPL main window.

    The Query window appears, as Figure 76 shows.

  2. Click Create in the Selection Type group.
  3. Choose a name for your query and type it in the Query text box.
  4. 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.

    Figure 76 shows the Query window with the Query text box completed and stores_demo selected from the selection list.

    Figure 76. The Query Window
    begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - end figure description
  5. Click OK.

    The query-definition window appears, as Figure 77 shows. The name that you chose for your query appears in the title bar.

  6. Type your query in the Select, From, and Where text boxes.

    Figure 77 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

    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.

    Figure 77. The Query-Definition Window
    begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - end figure description
  7. 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-hand side of the Query window.

  8. Click Cancel to return to the HPL main window.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]