To Work With Simple Database Queries

Construct simple or ranged queries to search values from one database table field at a time.

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 Quick Query

  1. In the Query Editor, on the Quick Query tab, select a field from the Field list.
  2. Select an operator from the list.
  3. Enter a value in the Value field, or click Look Up Values.

    Look Up Values returns a list of all values for the specified field from the database table, so you can select the value that you want. After selecting a value, click OK.

  4. Select one or both of the following:
    • Indicate Records in Data View. Highlights records that match your query in the Data View window.
    • Indicate Objects in Drawing. Highlights objects that match your query in the current drawing.
  5. If you want to save the query in the current drawing for future use, click Store.
  6. Click Execute to execute the query and close the dialog box.

    A subset of records that match your query criterion are displayed in the Data View window. To return to the Query Editor to refine your query, click the Return to Query button.

Construct a Range Query

  1. In the Query Editor, on the Range Query tab, select a field from the Field list.
  2. Enter a value in From, or click Look Up Values (From).

    Look Up Values displays a list of all values for the specified field from the database table, so you can select the value that you want. After selecting a value, click OK.

    The query searches for all values greater than or equal to the value that you specify.

  3. Enter a value in Through, or click Look Up Values (Through).

    The query searches for all values less than or equal to the value that you specify.

  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.