space
Previous Page | Next Page

SYSTEM 2000 Software

Selecting a Subset of Data

A database wouldn't be very efficient if all logical entries had to be accessed when you needed data from only some of them. SYSTEM 2000 enables you to specify a where-clause to identify those parts of the database that are relevant to your query or update.

A where-clause consists of the keyword WHERE (or WH) and one or more specific conditions that values must meet. Usually, a condition consists of a schema item, an operator, and a value or a range of values. For example:

    WHERE ACCRUED VACATION EXISTS
    WHERE SEX EQ MALE
    WHERE BIRTHDAY SPANS 01/01/1949 * 12/31/1949
    WHERE STREET ADDRESS CONTAINS /RIM ROCK/

You can also combine conditions by using connector operators to form expressions. For example:

    WHERE SKILL TYPE = COBOL AND 
    YEARS OF EXPERIENCE = 4

For the SAS/ACCESS interface to SYSTEM 2000, you can include a SYSTEM 2000 where-clause in a view descriptor to specify selection criteria. In addition to or instead of a SYSTEM 2000 where-clause, you can specify selection criteria in a SAS program by using a SAS WHERE clause.

Note:   The SYSTEM 2000 where-clause and the WHERE clause in SAS are different. For example, in a SYSTEM 2000 where-clause, the date format (by default) is MM/DD/YYYY, and you do not have to include single quotes around character strings.  [cautionend]

For more information, see where-clause in SYSTEM 2000, WHERE Clauses in SAS and where-clauses in SYSTEM 2000, and Connecting Strings to Order Conditions.

space
Previous Page | Next Page | Top of Page