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 |
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 |
The following examples illustrate how you can use AND and OR queries to search a database.
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.
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.
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.
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 |
The following table shows the operators and symbols you can use in search formulas.
Wildcards available in a criteria table |
The following table lists the wildcards you can use as search criteria.