home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
database
/
qdrsum.arc
/
SELECT.DOC
< prev
Wrap
Text File
|
1987-10-21
|
3KB
|
59 lines
SELECTION CRITERIA SPECIFICATION
The standard input is read for a list of selection criteria of records to
include in the report. To include ALL records in the database, enter an empty
line (press RETURN at start of line) after the SUMMARY call, otherwise enter
lines like the following:
FIELD1="VALUE1" & FIELD2<"VALUE2"
FIELD3!="VALUE3"
FIELD4>"VALUE4"
where FIELDn is a database field name and VALUEn is a possible value. End the
list by a blank line. Using redirection, the selection list can be read from
a file: place <SELCTFIL on the call line, where SELCTFIL is the selection
list file name.
The syntax for a line, called a selector, is one or more field compari-
sons or record specifiers, separated by the AND operator (&). A record is
selected if it satisfies all of the comparison tests on a line.
A field comparison comprises a field name specifier, a comparison opera-
tor, and a value. A field name specifier picks the first field in the data-
base record whose name's leading characters exactly match the given charac-
ters. The comparison operators are: '=', '<', '>', '!=', '<=', and '>=', with
their usual meanings. Enclose values in double quotation marks. A value con-
taining fewer characters than the specified field is compared with the leading
characters of the field. Excess characters in the value are ignored. Satis-
fying any line's criteria selects a record for the report's statistics and
displays.
A record specifier consists of the character '#', a comparison operator,
and a decimal number. Record numbers start at the value one, and include any
deleted records. Records are in the sequence of the last sort performed by
PC-FILE+. If the database has never been sorted, then records are in the
order they were added to the database. A record is selected if its record
number satisfies the record specifier's comparison. For example:
#<2
only selects the first record in the database. Note that the value for com-
parison is not enclosed in quotation marks--it must be a decimal number. All
of the usual comparison operators can be used in a record specifier.
The first example selects all records having VALUE1 in the first seven
characters of FIELD1 and whose FIELD2 value's first six characters are alpha-
betically lower than VALUE2, plus those records which do not have VALUE3 in
the first six characters of FIELD3, plus those records whose FIELD4 value's
first six characters are alphabetically higher than VALUE4.
All string comparisons are made against ASCII sort order. Thus, the
space character precedes all other characters, and numbers precede letters.
"FOR " is lower than "FORM" and "VALUE2" will precede "VALUED". Lower case
letters come later in the ASCII order than upper case letters, but case is
usually ignored, so "aB" equals "Ab". The /U option turns on case sensitivity
in the string comparisons.