- Dynamic query
A dynamic query is automatically refreshed each time it is used. When you use a dynamic query, the program searches the database for any new records meeting the criteria you specify and adds them to the results. Use dynamic queries whenever you need the query to remain current (automatically refresh). For example, you have a query of volunteers. Each time you use that query for a report or mailing, you want to be sure that it includes everyone who is currently marked as a volunteer and does not include anyone who is no longer marked as a volunteer. Because a dynamic query automatically updates itself (refreshes), you know that it is current. Most queries that you run will be dynamic queries.
- A dynamic query is updated every time it is run or used in other modules such as Mail, Reports, and Export.
- The results of a dynamic query always reflect changes made since the last time the query was run
- Because dynamic queries consist of an ever-changing group of records, an exact number of records does not appear on the query information screen. Instead, the number appears as N/A or ## (approx.).
- Static query
A static query is like taking a snapshot of your database at the time the query is created. Only the records selected when the query is first created will be included when the query is used in the program. Use static queries when doing global changes. The same constituents are still in the static query so you can easily find them again if the need arises. Output queries and merged queries are static.
- A static query contains only those records which met the specified criteria at the time the query was created
- Static keys are pointers to each record in your query. The number of static keys equals the number of records in your query
- A static query is not updated when used in other modules such as Mail or Reports
- Static queries can be re-run through Query and will be updated with new records meeting the criteria in the query
Note: You may notice that that static query results can differ from the records originally captured in the query. The query results window displays records that would meet the criteria if you were to refresh it (or if you processed a dynamic query). Unless you refresh your static query, the static keys in your query remain the same. To see exactly which records are in your static query, process labels in Mail based on that query.