The form fields are used to enter search patterns or query conditions. You enter text or numbers to match a field's contents. You can use magic characters (pattern characters, wild-cards) to match text patterns, or you can use operators to select number and date ranges. Blank fields are ignored when assembling parameters to use for the query.
Dropdown lists that appear in a data form are changed to multi-value lists on the query form.
Multiple values to match can be selected from the list by holding down the Ctrl
key when clicking on the selections. Clicking the
button next to the list clears the selection if you make a mistake.
Clicking the
button swaps the list for a text field that you can use to enter a pattern match for the field.
Clicking the
button pops up a little form to use to enter query parameters for a particular field.
Short-cuts can be used to enter dates in the popup form, such as using
010101
for January 1, 2001 or using +30
to specify a date 30 days from today.
Magic characters are characters that have special meaning when matching text patterns. They cannot be used to match number fields — fields that store only numbers. Use Operators described in the next section instead.
. |
The period matches any single character. |
* |
A star matches 0 or more occurrences of the previous character. The construct '.*' matches any string. |
[ ] |
Matches any character enclosed within the brackets. |
? |
The previous character or pattern may or may not occur in the field. |
^ |
At the beginning of a pattern forces the pattern to match the field at the beginning. |
$ |
At the end of a pattern forces the pattern to match the end of the field. |
Example: | ^Smi.* |
matches all the names beginning with "Smi". |
---|---|---|
Example: | Sm[iy]th |
matches either "Smith" or "Smyth". |
Operator are used to select number and date ranges.
> number |
matches numbers or dates greater than number . |
< number |
matches numbers or dates less than number . |
>= number |
matches numbers or dates greater than or equal to number . |
<= number |
matches numbers or dates less than or equal to number . |
<> number |
matches numbers or dates not equal to number . |
!= number |
matches numbers or dates not equal to number . An alternate way to specify <> . |
= null |
matches a null value (empty, no value assigned). Simply entering = also matches a null value. |
number1 : number2 |
matches a number or date between number1 and number2 . |
It is safest to surround dates with single quotes ' (apostrophes), but it is not necessary for simple queries.
Example: | > '1/1/99' |
selects an item if the date is greater than January 1, 1999. |
---|---|---|
Example: | 1/1/2001 : 12/31/2001 |
selects the items with a date between January 1, 2001 and December 31, 2001. |
For those who know SQL, the field entries can be constructed
like SQL. Use $
to represent the field contents.
Example: | $ < 10 or $ > 20 |
selects an item if the field value is less than 10 or greater than 20. |
---|
An alternate method of specifying if a field equals a value or another value is to use the | symbol.
Example: | < 10 | > 20 |
selects an item if the field value is less than 10 or greater than 20. A $ is NOT used with this method. |
---|
You can exclude records from your current query by specifying a list file name in the "Exclude List" field. This is helpful for building up lists.
For example (and this is the reason why this feature exists), if you had an advertising mailing of 5000 pieces budgeted, you could first select customers age 25 to 35 that live in Connecticut. Save the results in a list file and enter the name of that list file in the "Exclude List" field for the next query(s). The next query searches for customers age 35 to 40. If the number of customers queried plus the number saved in the list file is greater than 5000, then you could redo the query searching for customers age 35 to 37, or something like that. Each successive query result can be saved and appended (added) to the list file which then can be excluded from the next query.