The simplest query uses one operator to search one field for a certain value. The range query searches one field to return records that fall within a range you specify.
The Quick Query tab is designed to familiarize you with query syntax as quickly as possible. Constructing a quick query involves selecting a field from the current database table, applying a conditional operator to it, and specifying a value for the field.
Conditional operators are constraints such as equal, greater than, or less than. The following table summarizes the Quick Query tab's operators.
Query Operators | |
---|---|
Operator | Description |
Equal (=) | Returns all records that exactly match the value that you specify. |
Not equal (<>) | Returns all records except those matching the value that you specify. |
Greater than (>) | Returns all records that exceed the value that you specify. |
Less than (<) | Returns all records with values that are less than the value that you specify. |
Greater than or equal (>=) | Returns all records that exceed or equal the value that you specify. |
Less than or equal (<=) | Returns all records that are less than or equal to the value that you specify. |
Like | Returns all records that contain the value that you specify. Using the like operator, you can specify the optional % wild-card character. If, for example, you want to return all records that end with the string "ert", you enter the value %ert. If you want to return all records that begin with the string "ert", you enter the value ert%. If you don't specify the % wild-card character, the program searches for the exact value that you specify. |
In | Returns all records that match a set of values that you specify. If, for example, you are searching for an employee record but are not sure if the name is spelled Smith or Smythe, you could issue the in operator and provide both spelling values to return all records spelled either Smith or Smythe. The two values must be separated by a comma. |
Is null | Returns all records that do not have values specified for the field that you're querying. This operator is useful for locating records in your database table that are missing data. |
Is not null | Returns all records that have values specified for the field that you're querying. This operator is useful for excluding from your query any records in your database table that are missing data. |
Like the Quick Query tab, the Range Query tab is designed to assist users who are new to working with database queries. Using the Range Query tab, you can specify a range of values for the query to return: for example, all rooms that are greater than or equal to 80 square feet but are less than or equal to 100 square feet. The interface is similar to that of the Quick Query tab, except the Operator field has been removed and the Value field has been replaced with two fields: a From field and a Through field. All other interface features are available and work as they do on the Quick Query tab.