Query Types

  • Individual queries include only individual records.
  • Organization queries include only organization records.
  • Constituent queries include both individual and organization records.
  • Gift queries group on gifts as actual records. The number of records created is in gift records, not constituent records. For example, if a donor gave three gifts that meet the query's criteria, he or she will appear in the query three times.
  • Relationship queries select the constituents with relationships that meet your criteria. The number of records created is in relationship records, not constituent records.
  • Special Events queries are available only if you have the RE:Event optional module. This query type selects events, registrants, etc., that meet the criteria. Event registrants not in the database are included in these queries.

Query Formats
Dynamic queries search the database and include all records that meet the criteria each time the query is used. Because these queries represent an ever-changing group of records, an exact number of records does not appear on the query information screen. The number of records will appear as N/A or 15(approx.).

Static queries take a snapshot of the records selected when you create the query. When saving a static query, the program generates keys. These keys are attached to the records that meet the specified criteria during the initial query creation. If you make changes to your database, you must refresh a static query to include any new records or omit any old ones. To refresh a query, select File, Refresh Static Query from the menu bar.

Output queries are queries created in modules other than RE:Query. Mark the Create Output Query checkbox. They do not appear in the Open query list in RE:Query. To select an output query, create a new query, select Edit, Properties from the menu bar, mark Select from Static Query, and search for the query. You can use an output query to find constituents who haven't given to your organization. Run the Non-contributors Report, and select to create an output query of the results.

To print a list of queries, select File, Print Queries from the menu bar. Print a Summary List or a Detail List, which includes the selected filters, sort, and output fields, for All or Selected queries.

To delete queries, select File, Delete from the menu bar. Select the query you want to delete from the list of available queries.

Query Components

  • Filter determines the criteria that records must meet to be included in the query.
  • Sort indicates the order (ascending or descending) in which the records appear in the query.
  • Output defines the fields displayed in the query results. To view the results in RE:Query, you must include at least one output field.

Query Operators
Operators are used to define the requirements a record must meet to be selected. The operators available depend on the field you select. Use negative operators sparingly as they create twice the work of positive operators and negate processing speed. Following are the query operators and examples:

  • Equals: must have the exact criteria.
  • Does Not Equal: does not match the criteria.
  • Greater Than: the value defined.
  • Greater Than or Equal To: the value defined.
  • Less Than: the value defined.
  • Less Than or Equal To: the value defined.
  • One of: must meet one of the criteria defined.
  • Not one of: must not have one of the criteria defined.
  • Between: must fall within a specified range.
  • Not between: the value must fall outside of the specified range.
  • Begins with: begins with the value defined. Records must have an entry beginning with the defined value.
  • Does not begin with: must not begin with the entry defined. Records must not have an entry beginning with the defined value.
  • Contains: selects records that have the entry you define. Records must have the entry you define anywhere in the field.
  • Does not contain: selects records that don't have the entry you define. Records must not have the entry you define anywhere in the field.
  • Blank: selects records with a blank field defined.
  • Is not blank: selects any record with anything in the entry defined.

Wildcards can be used only with Begins with, Does not begin with, Contains, and Does not contain.

  • ?: Use the question mark to replace a character (e.g., Sm?th)
  • *: Use the asterisk to replace a series of characters (e.g., Fr*nd)
  • []: Use the brackets to query for a range of characters or several characters (e.g., [A-E]).

Combining Operators provide a link when more than one filter is indicated and allow the creation of complex queries.

  • And: The records must meet both criteria. For example, you want all board members who contributed more than $500 last year (ConsCode= BM AND Gift > $500).
  • Or: The records can meet either criteria. For example, you want all board members OR anyone who contributed more than $500 last year (ConsCode= BM OR Gift > $500).

Parentheses: Includes multiple criteria to be considered as a whole. For example, you want constituents who gave more than $300 this year or all of your board members [(Amount>300 and Date >01/01/2000) OR board member].

New to Query? Check out Getting Started with Query (PDF) to understand basic concepts and create your first query—all in a matter of minutes! 

Detailed instructions for creating and using queries are in the Query and Export Guide