Reference: Using databases

When entering database cells in Quattro Pro, you must follow certain rules. These rules cover such items as the formatting of field names and the structure of the area filled by the database cells.

In addition, queries are a key component of Quattro Pro notebook databases. You can use specific operators and symbols to assist you in developing queries; you can also use wildcards.


Rules for entering database cells in Quattro Pro

Wordperfect Quattro Pro btnbacktotopproc Reference: Using databases

When you enter database cells in a Quattro Pro database, you must ensure that:

 
database cells fill a rectangular area that can contain any number of blank cells
 
database cells are entered in a contiguous format and are confined to one spreadsheet
 
field names are entered in the top row of the database cells, one name per column
 
field names are labels with no blank spaces at the beginning or end
 
field names are unique; they are different from other field and cell names you use
 
the first row of data is entered directly below the field names without leaving a blank row or inserting a row of symbols
 
you use the same type of data throughout each column; do not mix labels and values in the same column

Example of a notebook database query

Wordperfect Quattro Pro btnbacktotopproc Reference: Using databases

The following examples illustrate how you can use AND and OR queries to search a database.

Wordperfect Quattro Pro database Reference: Using databases

This database contains two columns, listing first and last names of company employees.

To create an AND query in a criteria table using the database example, type the criterion Kelly in the row under First Name and the criterion Kind in the row under Last Name.

Wordperfect Quattro Pro andquery Reference: Using databases

In this example, the criteria are entered in different cells of the same row in the criteria table.

Quattro Pro searches for records with the last name Kind and the first name Kelly. The search results reveal only one possible match; the output cells contain a record for Kelly Kind.

To create an OR query in a criteria table using the database example, type the criterion Barbara in the row under First Name and the criterion Kind in the next row under Last Name.

Quattro Pro searches for any records with the last name Kind and the first name Barbara. The search results reveal five matches.

Wordperfect Quattro Pro orquery Reference: Using databases

In this example, the output cells contain records for Kelly Kind, Steve Kind, Barbara Kind, Barbara Smith, and Barbara Wong.

To combine AND and OR queries in a criteria table using the database example, type the criterion Kelly in the row under First Name, type the criterion Kind in the same row but under Last Name, and the criterion Barbara in a new row under First Name.

Quattro Pro searches for any records with the last name Kind and the first name Barbara or Kelly. The search results reveal four matches; the output cells contain records for Kelly Kind, Barbara Kind, Barbara Wong, and Barbara Smith.

Wordperfect Quattro Pro andorquery Reference: Using databases

In this example, the records for Kelly Smith, Kelly O’Toole, and Steve Kind do not match the search criteria and are therefore not displayed in the search output cells.


Operators and symbols available in a search formula

Wordperfect Quattro Pro btnbacktotopproc Reference: Using databases

The following table shows the operators and symbols you can use in search formulas.

Use
To indicate
=
Equals
<>
Not equal
<

Less than
>
Greater than
<=
Less than or equal to
>=
Greater than or equal to
#AND#
Both expressions are true
#OR#
Either the first or the second expression is true
#NOT#
The first expression is true, and the second is false

Wildcards available in a criteria table

Wordperfect Quattro Pro btnbacktotopproc Reference: Using databases

The following table lists the wildcards you can use as search criteria.

Use
To search for
?
Any single character in a label. For example, typing t?p finds tip, top, or tap, but not tape or stop.
*
Any number of characters to the end of a label. For example, typing ten* finds tender, tension, and tent, but not attention.
~
All labels in a field except those that match the search condition. This symbol is referred to as tilde. For example, typing ~Boston under the City column in the criteria table finds all records that do not have Boston in the City field.

Reference: Using databases