Difference between revisions of "SELECT"
Helengeorge (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 8: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[ALIAS() | + | [[ALIAS()]], [[SELECT()]], [[SET FILTER]], [[SET RELATION]], [[SET VIEW]], [[USE]], [[WORKAREA()]] |
==Description== | ==Description== | ||
− | The SELECT command is used to select a workarea | + | The SELECT command is used to select a workarea. At any given time, a particular workarea is active and selected. When you USE a table in a selected workarea, an ALIAS name may be optionally specified. If none is specified, the table basename can also be used as the alias as can the workarea letter A to Z. The alias 'm' is reserved for memory variables and cannot be used to reference a workarea. This ALIAS name gives the workarea an identification, so that you can reference fields in workareas other than the currently selected one, by preceding the field name with the ALIAS name followed by '->' or '.' followed by the field name. This construction is known as an alias pointer. |
− | + | ||
− | + | ||
Each workarea contains the context for the table that has been opened in that workarea. The current record pointer, the current record, the format file, the index files, the filter condition, and the relationships to other workareas. The SELECT 0 command selects the next available workarea and provides an alternative to using the WORKAREA() function. The LIST STATUS command provides full details of the current status of each workarea. | Each workarea contains the context for the table that has been opened in that workarea. The current record pointer, the current record, the format file, the index files, the filter condition, and the relationships to other workareas. The SELECT 0 command selects the next available workarea and provides an alternative to using the WORKAREA() function. The LIST STATUS command provides full details of the current status of each workarea. |
Revision as of 16:46, 15 December 2009
Purpose
Select a workarea
Syntax
SELECT <workarea | alias>
See Also
ALIAS(), SELECT(), SET FILTER, SET RELATION, SET VIEW, USE, WORKAREA()
Description
The SELECT command is used to select a workarea. At any given time, a particular workarea is active and selected. When you USE a table in a selected workarea, an ALIAS name may be optionally specified. If none is specified, the table basename can also be used as the alias as can the workarea letter A to Z. The alias 'm' is reserved for memory variables and cannot be used to reference a workarea. This ALIAS name gives the workarea an identification, so that you can reference fields in workareas other than the currently selected one, by preceding the field name with the ALIAS name followed by '->' or '.' followed by the field name. This construction is known as an alias pointer.
Each workarea contains the context for the table that has been opened in that workarea. The current record pointer, the current record, the format file, the index files, the filter condition, and the relationships to other workareas. The SELECT 0 command selects the next available workarea and provides an alternative to using the WORKAREA() function. The LIST STATUS command provides full details of the current status of each workarea.
Example
select a use patrons index events, dates alias pat select b use addresses index addr_names alias add select pat ? add.state
Products
Recital Server, Recital