Select records.
The SELECT command determines what records are processed and printed.
General format
select field_name -
SELECT field _name -
[,INCLUDE = selection or (selection,selection...)] -
[,EXCLUDE = selection or (selection,selection...)] -
[,FROM = date] -
[,TO = date] -
[,MINIMUM = number] -
[,MAXIMUM = number] -
[,IFSET = flag or (flag,flag...)] -
[,IFCLEAR = flag or (flag,flag...)]
Examples
SELECT DATE,FROM=1-JAN-2002,TO=1-APR-2002
Each selected record MUST MEET ALL SELECT conditions present. If you have two SELECT statements, one that selects account A and another that selects account B no data will be printed.
Qualifiers
exclude = selection or (selection,selection...)
The EXCLUDE option will exclude certain records if the value matches any one of the supplied selection strings. Each SELECT statement can have a maximum of 20 exclude selection strings. This can only be used with fields of type T. This exclude selection can be prompted for.
field_name
The field name must be the first word in the command. The field names are different for each database used in generating a report. Please refer to the Field Table for the particular database. This name can be prompted for.
from = date (Default = start of current month)
The FROM option specifies the start of a date range that is to be selected. This can only used with fields of type QD. The from date can be prompted for.
ifclear = flag or (flag,flag...)
The IFCLEAR option selects records if the specified field does NOT contains the specified flag. This can only be used with fields of type QM, LM, WM or BM. The flag names can be prompted for.
ifset = flag or (flag,flag...)
The IFSET option selects records if the specified field contains the specified flag. This can only be used with fields of type QM, LM, WM or BM. The set flag names can be prompted for.
include = selection or (selection,selection...)
The INCLUDE option selects records if the field contains any one of the specified selection strings. The supplied strings can contain wildcards. Each select statement can have a maximum of 20 include selection strings. This can only used with fields of type T. The include selections can be prompted for.
maximum = number
The MAXIMUM options selects records that are less than this quantity. This can only be used with fields of type Q, L, W, B, QU, LU, WU or BU. The maximum number can be prompted for.
minimum = number
The MINIMUM option selects only records where the field is greater than this value. This can only be used with fields of type Q, L, W, B, QU, LU, WU or BU. The minimum value can be prompted for.
special_word
Special options are available when extracting data from certain databases. Please refer to the description of the particular database.
to = date (Default = NOW)
The TO option specifies the end of a date range. Any valid combination time format can be specified. This can be used only with fields of type QD. The to date can be prompted for.