To Work With the Query Builder

Create queries based on multiple criteria using boolean operators and parenthetical groupings.

Open the Query Editor

  1. Click Tools menu PalettesdbConnect.
  2. In the tree view, select a database table.
  3. Click the New Query button.
  4. Enter a name for the query in New Query Name.
  5. Click Continue to open the Query Editor.

Construct a Single Parameter Query

  1. In the Query Editor, on the Query Builder tab, choose a field from the drop-down list in the Field cell.
  2. Choose an operator from the Operator cell drop-down list.
  3. Enter a value in the Value cell, or click the [...] button.

    The [...] button returns a list of all values for the specified field from the database table, allowing you to select the value you want. After selecting a value, click OK.

  4. If you want to save the query in the current drawing for future use, click Store.
  5. Click Execute to execute the query and close the dialog box.

Construct a Multiple Parameter Query

  1. Enter the first parameter of your query as described above.
  2. Select the appropriate And or Or operator from the Logical field.

    Clicking in the Logical field inserts an And operator. Clicking the cell again changes the value to Or.

  3. Enter additional query parameters on subsequent rows.
  4. Repeat step 2 for each additional parameter except the final query parameter.
  5. Apply parenthetical grouping, if appropriate.

    Click the cell to the left of the Field cell that begins the phrase that you want to group. A single left parenthesis is inserted. Click the cell to the right of the Value cell that ends the phrase that you want to group. A single right parenthesis is inserted.

  6. If you want to save the query in the current drawing for future use, click Store.
  7. Click Execute to execute the query and close the dialog box.

Specify the Display of Fields for Query Results

  1. Construct your query as described above.
  2. Select the first field that you want to appear in the Fields in Table list.
  3. Above the Show Fields list, click Add.
  4. Repeat steps 2 and 3 to include additional fields.

Specify the Sort Order for Query Results

  1. Construct your query as described above.
  2. Select the first field that you want to sort on from the Show Fields list.
  3. Above the Sort By list, click Add.

    By default, the selected field is sorted in ascending order. Click the Sort button to sort in descending order.

  4. Repeat steps 2 and 3 for any additional fields that you want to sort on.