10.1.0 Query Examples

(No Operator)

At the Query form screen you can enter data into the applicable fields to find all records which have the same data entered into the same field for each record. For example if you wanted to find all records where the name "Jones" is entered into the NAME field all you would have to do is type "Jones" into that field when you have executed the Query by form function. Unless you specify case matching before running the Query, the search will find all matches of "Jones" regardless of the word being in upper or lower case or a combination of both.

If you wanted to find matches for a date you would enter the date as ie: "25/05/97" into the applicable field which would contain a match for that date.

(; Logical OR)

You can use the ";" operator to find records where the question you are asking includes multiple records. For example if you wanted to find all records where the surname "Jones" OR "Smith" appeared into the Surname field you would enter "Jones;Smith".

(& Logical AND)

Use the "&" operator to find matches for records where the question you are asking specifies records that must have two or more pieces of information contained within.

For example, if you wanted to find all records where "age " is greater than or equal to 31 AND less than 35 you search would would look like the following;

AGE: >=31&<=35

This search combines multiple operators to retrieve all records where the age field contains all ages from 31 to 35 years.

( ? Single Wild Card )

The "?" single wild card character can be used to replace single letters or numbers in a search where a particular character is not known.

ie; To find all records where Name contains Bill or Bull you would fill in the Query form like this : NAME: b?ll .

(* Many Wild Card )

The "*" character works in a similar fashion to the single wild card character except it can replace multiple letters depending on how it is used.

You can use it to find a text string or word within a sentence such as;

*Tuesday* ; This would find all occurences of the word "Tuesday" within a sentence found in a particular field, such as a memo field in an appointment book.

You may have typed a memo to yourself after talking to someone on the phone and at a later date wish to retrieve that memo to remind yourself of what notes you had taken. You may only remember a key word or a particular phrase that you typed in the memo and to find that particular phrase or word you would enclose it with the "*" symbol at each end.

ie; *worthy adversary*. This would find a memo containing the character string such as in.

"I spoke to John on the weekend about the practice I had been doing on the driving range and he claimed that I would make a worthy adversary on the golf course next weekend"

The "*" could also be used to find all occurences where a word begins with or ends with a character string as in; *day , would find words such as "Monday","Tuesday" etc.

( ~ Sounds Like )

There may be an occassion where you don't know the spelling of a word or name that you wish to search for.

For example, you may not know if a persons name is spelled as ,Stephensen, Stevenson or Stevensen. As long as you atleast know the first letter you can search for similar sounding values using the " ~ " Sounds like query operator.

For example to search for a name like Stevensen, you should fill in the query form like this. NAME: ~stevensen.

( ! Field is blank or empty )

To search for records that have empty fields you can use the "!" operator.

For example the find all records where SERVICE NUMBER and DATE OF BIRTH are both blank or empty you woul fill in the query form as:

SERVICE NUMBER: ! DATE OF BIRTH : !

( .. Range of values )

At times you may wish to search for records in which a fields value is between two values. To perform this kind of search you would use the " .. " Range operator.

For example, you might want to try and find all personnel who were born between 1/1/1963 and 1/6/1965. To perform this search you would fill in the query form as:

1/1/1963 .. 1/6/1965.

The ".." Range operator works in the same way as using >= and the <= operator.

( # or <> Not equal to )

To search for records that do not match a particular search string you would use the (# or <>) not equal to operators in front of the search restriction.

For example if you were looking for all records where RANK: is Not equal to SGT you would fill in the query form as:

RANK: #SGT or RANK: <>SGT.

This will find all records in the database that do not contain the rank of SGT.

(<= Less than or equal to)

To search for records where you want to find a value that is less than or equal to your search criteria you would use the (<=) operator in front of the search criteria.

For example, if you want to find all records where a persons age is less than or equal to 35 years old you would fill in the query form as ;

AGE : <=35 This would return all records where the persons age was less than or equal to 35 years of age.

This operator can be used in text strings as well such as; NAME : <= Jones, would return all records where, alphabetically, Names would be below or equal to Jones, ie ; Arnold to Jones.

( >= Greater than or equal to )

To search for records where you want to find a value that is greater than or equal to your search criteria you would use the (>=) operator in front of the search criteria.

For example, if you want to find all records where a date of birth is greater than or equal to 01/05/65 you would fill in the query form as ;

D.O.B : >=01/05/65 This would return all records where a person was either born on or after the first of May 1965.

This operator can be used in text strings as well such as; NAME : >= Wilson, would return all records where, alphabetically, Names would include Wilson and any name alphabetically is after wilson.

( < Strictly less than )

Use the " < " operator to find all records where the search criteria looks for all records that are strictly less than the value you enter. For example, to find all records where age is strictly less than 25 years you would fill in the query form as:

AGE : <25. This would return all records where the AGE field contains a value strictly less than 25 but not including 25.

( > Strictly greater than )

Use the " > " operator to find all records where the search criteria looks for all records that are strictly greater than the value you enter. For example, to find all records where NAME is strictly greater than "Jones" you would fill in the query form as:

NAME : >Jones. This would return all records where the NAME field contains a value strictly greater than Jones but not including Jones.

(= = Exactly equal to, case sensitive )

The "= = " operator will find exact matches for any search criteria taking into consideration upper case, lower case or any mixture that is used in the field. For example if you wanted to find all cases of the name "Jones" but not "jones" you would fill in the query form as:

NAME : = = Jones