Query Tab |
The Query tab, located in the Database Connection Setup dialog, allows you to specify search criteria that will determine which records are printed. Multiple fields can be included in the search criteria. Arbitrary relationships and comparisons may also be set up between the fields. The settings in the Query tab will be used to automatically generate an SQL select statement. Alternatively, you can specify a custom SQL select statement using the SQL tab of the Database Connection Setup dialog.
To build a query statement using the Query tab, simply select the desired field names and comparison criteria from the dropdown lists. Where appropriate, you may also need to type in comparison values. Although a SQL select statement will be built for you "behind the scenes," you do not have to know SQL to build one.
The Query tab contains a table with the following fields:
(. Specifies operator precedence when multiple queries are defined.
Fields. Specifies the field that will be used to determine whether individual records in the database will print.
Operators. Specifies the operator that describes the desired relationship between the Field and the Criteria.
Criteria. Defines the value used to compare to each field's data. The criteria can either be a constant value that you type in, a selection from the list of values currently contained in the database, or a query prompt value entered at print-time.
). Specifies operator precedence when multiple queries are defined.
And/Or. Defines how one or more queries are connected to each other.
AND. Performs a logical conjunction on two queries, meaning that both query results must match the criteria in order to print a record from the database.
OR. Performs a logical disjunction on two queries, meaning that either query result can match the criteria in order to print a record from the database.
End. Ends a query statement.
The Query tab contains the following additional options:
Delete All. Deletes all of your queries.
Query Prompts. Opens the Query Prompts dialog, which allows you to define query prompts where you can enter the criteria upon execution of a print job. This is useful when the criteria is unknown when constructing a query, but will be known at print-time.
Ignore Case. Ignores the case of the text in a query.
Related Topics