To Use the Visual SQL Query Builder to Build a Query: Example 3

  1. Click Clear All to clear any existing tables.
  2. In the Select tab page, click Tables or select menu option Tables > Open Table.
  3. In the Select Table dialog, double-click Parcel.
  4. In the Select Table dialog, click Cancel.
  5. In the Parcel dialog, double-click the Parcel_no, owner, house_num, str_name fields.

    The following displays in the SQL Select Statement text box:

    SELECT  parcel_no, owner, house_num, str_name 
     FROM  parcel
  6. Click the Where tab.

    The Where tab page opens.



  7. In the Available Fields list box, click the parc_value field.

    The selected field appears in the Where Fields list box.

  8. Click >= (greater than or equal to). In the Value text field, type 50000 and press Enter.
  9. Click And to create the second WHERE clause.

    AND displays in the Where Fields list box.

  10. Click parc_area in the Available Fields list box, click >= (greater than or equal to), enter 100000 in the Value text field and press Enter.

    The entered operator and value display in the Where Fields list box.

  11. Click Apply to add the clause in the Where Fields list box to the SQL Select Statement text box.

    The following displays in the SQL Select Statement text box:

    SELECT  parcel_no, owner, house_num ,str_name
    FROM  parcel
    WHERE  parc_value >= 50000  AND 
    parc_area >=  100000 

    The query in the SQL Select Statement text box is complete.

  12. Click Execute.

    If Output > Forms is turned on in the Visual SQL Query Builder dialog, clicking Execute generates a dialog form.



    If Output > Browser is turned on in the Visual SQL Query Builder dialog, clicking Execute generates a list (containing the same information as in the dialog form) which is displayed in the Visual SQL Data Browser dialog.