Difference between revisions of "SET AUTOJOIN"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Enable automatic creation of indexes to satisfy relationships | Enable automatic creation of indexes to satisfy relationships | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | SET RELATION, SET VIEW | + | [[INDEX]], [[REINDEX]], [[SET RELATION]], [[SET VIEW]] |
Line 29: | Line 22: | ||
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
select a | select a | ||
use addresses | use addresses | ||
Line 35: | Line 28: | ||
use patrons | use patrons | ||
set autojoin on | set autojoin on | ||
− | set relation to name into addresses</ | + | set relation to name into addresses</code> |
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|AUTOJOIN]] | [[Category:Set_Commands|AUTOJOIN]] | ||
+ | [[Category:Indexing]] | ||
+ | [[Category:Indexing Set Commands]] |
Latest revision as of 16:40, 12 November 2009
Purpose
Enable automatic creation of indexes to satisfy relationships
Syntax
SET AUTOJOIN ON | OFF | (<expL>)
See Also
INDEX, REINDEX, SET RELATION, SET VIEW
Description
If SET AUTOJOIN is ON, then an index file is automatically generated to satisfy the relationship between two tables when a SET RELATION TO command is executed.
When the SET RELATION TO command is executed, a check is made to see if the target table which is being related has an index associated with it. If not, a temporary index is generated on a field in the target table which has the same name, data type and width as that which is specified in the SET RELATION command. The index is a single index file with a ’.tmp’ extension. If no matching field exists, an error is given.
This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, AUTOJOIN is set ON. If a value of .F. is returned, AUTOJOIN is set OFF. Note that <expL> should be enclosed in round brackets. You should create the required index files to satisfy any permanent relationships, so that they are not created each time the relationship is specified. The use of AUTOJOIN should be limited to temporary views across tables only.
By default, AUTOJOIN is OFF.
Example
select a use addresses select b use patrons set autojoin on set relation to name into addresses
Products
Recital Server, Recital