Difference between revisions of "SET ORDER"

From Lianjapedia
Jump to: navigation, search
 
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Select the master index file from the active index file list
 
Select the master index file from the active index file list
 
  
 
==Syntax==
 
==Syntax==
 
SET ORDER TO [<expN> | [TAG] <tag-name> [OF <.dbx filename>] | <single index filename> [ASCENDING | DESCENDING]]
 
SET ORDER TO [<expN> | [TAG] <tag-name> [OF <.dbx filename>] | <single index filename> [ASCENDING | DESCENDING]]
 
  
 
==See Also==
 
==See Also==
[[INDEX]], [[INDEXKEY()]], [[INDEXORDER()]], [[MDX()]], [[NDX()]], [[SET COMPATIBLE]], [[SET INDEX]], [[TAG()]], [[TAGCOUNT()]], [[TAGNO()]], [[USE]]
+
[[INDEX]], [[INDEXKEY()]], [[INDEXORDER()]], [[MDX()]], [[NDX()]], [[SET INDEX]], [[SET KEY]], [[TAG()]], [[TAGCOUNT()]], [[TAGEXPR()]], [[TAGFOR()]], [[TAGKEY()]], [[TAGNO()]], [[TAGUNIQUE()]], [[USE]]
 
+
  
 
==Description==
 
==Description==
The SET ORDER TO <expN> command selects an open index file as the master index.  The master index is the index file searched during the FIND and SEEK commands, and also defines the order in which records are retrieved from the table.  The master index may be selected with a number, <expN>.  This is the sequential number of the index in the current list of indexes associated with a .dbf file.  Single index files (.ndx/.idx) may also be selected by name, <single index filename> if SET COMPATIBLE is set to FOXPRO, FOXPLUS, FOXBASE or VFP.  If .dbx files are in use, the master index may be selected using a tag name.  If there are tags that have the same name, they may be specified exactly with the OF <.dbx filename> qualifier.
+
The SET ORDER TO <expN> command selects an open index file as the master index.  The master index is the index file searched during the FIND and SEEK commands, and also defines the order in which records are retrieved from the table.  The master index may be selected with a number, <expN>.  This is the sequential number of the index in the current list of indexes associated with a .dbf file.  If .dbx files are in use, the master index may be selected using a tag name.  If there are tags that have the same name, they may be specified exactly with the OF <.dbx filename> qualifier.
  
 
The SET ORDER TO 0 or SET ORDER TO commands cause index files to be ignored when retrieving records, but they will still be updated if any changes are made to the table.  The SET ORDER TO command is only valid with tables that have index files associated with them.
 
The SET ORDER TO 0 or SET ORDER TO commands cause index files to be ignored when retrieving records, but they will still be updated if any changes are made to the table.  The SET ORDER TO command is only valid with tables that have index files associated with them.
Line 18: Line 15:
 
====ASCENDING | DESCENDING====
 
====ASCENDING | DESCENDING====
 
The optional ASCENDING | DESCENDING can be used to determine the order in which records are accessed and displayed.
 
The optional ASCENDING | DESCENDING can be used to determine the order in which records are accessed and displayed.
 
  
 
==Example==
 
==Example==
Line 26: Line 22:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|ORDER]]
 
[[Category:Set_Commands|ORDER]]
[[Category:Indexing]]
+
[[Category:NoSQL Commands]]
[[Category:Indexing Set Commands]]
+

Latest revision as of 07:09, 6 February 2017

Purpose

Select the master index file from the active index file list

Syntax

SET ORDER TO [<expN> | [TAG] <tag-name> [OF <.dbx filename>] | <single index filename> [ASCENDING | DESCENDING]]

See Also

INDEX, INDEXKEY(), INDEXORDER(), MDX(), NDX(), SET INDEX, SET KEY, TAG(), TAGCOUNT(), TAGEXPR(), TAGFOR(), TAGKEY(), TAGNO(), TAGUNIQUE(), USE

Description

The SET ORDER TO <expN> command selects an open index file as the master index. The master index is the index file searched during the FIND and SEEK commands, and also defines the order in which records are retrieved from the table. The master index may be selected with a number, <expN>. This is the sequential number of the index in the current list of indexes associated with a .dbf file. If .dbx files are in use, the master index may be selected using a tag name. If there are tags that have the same name, they may be specified exactly with the OF <.dbx filename> qualifier.

The SET ORDER TO 0 or SET ORDER TO commands cause index files to be ignored when retrieving records, but they will still be updated if any changes are made to the table. The SET ORDER TO command is only valid with tables that have index files associated with them.

ASCENDING | DESCENDING

The optional ASCENDING | DESCENDING can be used to determine the order in which records are accessed and displayed.

Example

use patrons index address.dbx
set order to tag zip of address