Microsoft KB Archive/64019

Works: Querying on Multiple Conditions in More than One Field

PSS ID Number: Q64019 Article last modified on 10-22-1998

1.00 1.05 2.00 3.00

MS-DOS

=
========================================================= 1.00 1.05 2.00 3.00 MS-DOS kbotherrange formula or

= SUMMARY =

When a Works 3.0 or earlier database query contains criteria in more than one field of a database, the criteria from each field are connected with a logical AND function. For instance, the following query finds only records with a name equal to “John” AND an age of 21 or greater:

Name: =“John” Age: >=21

Records satisfying only one of the above criteria remain hidden.

To connect criteria in different fields with a logical OR function (for example, to find all records with a name equal to John OR an age of 21 or greater), use the OR operator to combine all the criteria in one field. NOTE: In Works 1.x and 2.0, the OR operator is the | symbol; in Works 3.0 it is #OR#.

= SAMPLE QUERY =

For example, the following query would find all records with a name equal to “John” along with all records having an age of 21 or greater.

Works 1.x and 2.x
Name:==“John”|Age>=21 Age:

Works 3.0
Name:==“John”#OR#Age>=21 Age:

Note that no criterion is necessary in the Age field.

= REFERENCES =

For more information about how to perform this task in Works, see your Works printed documentation or online Help.

KBCategory: kbother KBSubcategory: wworkskb dworkskb Additional reference words:

= w_works =

Version : 1.00 1.05 2.00 3.00 Platform : MS-DOS ============================================================================= Copyright Microsoft Corporation 1998.