Difference between revisions of "SET SKIP"

From Recital Documentation Wiki
Jump to: navigation, search
(Example)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SET SKIP=
 
 
 
==Class==
 
Table Organization
 
 
 
 
==Purpose==
 
==Purpose==
 
Automatically establishes one-to-many relationships across related tables
 
Automatically establishes one-to-many relationships across related tables
Line 11: Line 4:
  
 
==Syntax==
 
==Syntax==
SET SKIP TO [<alias>,[<alias>]...]
+
SET SKIP TO [<alias>, ...]
  
 
SET SKIP ON | OFF | (<expL>)
 
SET SKIP ON | OFF | (<expL>)
Line 17: Line 10:
  
 
==See Also==
 
==See Also==
[[SET FILTER]], [[SET RELATION]]
+
[[ALIAS()]], [[CREATE VIEW]], [[DBRSELECT()]], [[DISPLAY]], [[INDEX]], [[LIST]], [[REPORT]], [[SELECT]], [[SET FILTER]], [[SET RELATION]], [[SET VIEW]], [[SKIP]], [[TARGET()]], [[USE]]
  
  
Line 23: Line 16:
 
The SET SKIP TO <alias> command allows for master to detail relationships between tables.  It allows you to access all detail records in a related table.  This command is only effective when SET RELATION is ON, and when a relationship exists between data files.  The SET SKIP TO <alias> command operates by starting at the innermost relationship and scanning for all duplicate relationship keys to satisfy all detail records for the relationship.  It then skips up a level in the relationship chain and performs the same operation on that data file.  The record pointer in all specified related data files will update before the record pointer in the active data file is changed.  Then it skips up to the master data file, reading the next record and setting up related data files.
 
The SET SKIP TO <alias> command allows for master to detail relationships between tables.  It allows you to access all detail records in a related table.  This command is only effective when SET RELATION is ON, and when a relationship exists between data files.  The SET SKIP TO <alias> command operates by starting at the innermost relationship and scanning for all duplicate relationship keys to satisfy all detail records for the relationship.  It then skips up a level in the relationship chain and performs the same operation on that data file.  The record pointer in all specified related data files will update before the record pointer in the active data file is changed.  Then it skips up to the master data file, reading the next record and setting up related data files.
  
Master to detail relationships that have been set up with the SET SKIP TO <alias> command only affect the DISPLAY, LIST and REPORT commands.  The number of workareas supported is determined by the environment variable / symbol / registry entry DB_ MAXWKA.  By default, this is set to 20 but it can be raised, allowing up to DB_MAXWKA-1 relationships.  The SET SKIP TO command disables relationships previously set with the SET SKIP <alias> command.  The SET SKIP ON/OFF commands enable or disable the satisfying of the master detail relationship defined with the SET SKIP TO <alias> command on a system wide basis.
+
Master to detail relationships that have been set up with the SET SKIP TO <alias> command only affect the DISPLAY, LIST and REPORT commands.  The SET SKIP TO command disables relationships previously set with the SET SKIP <alias> command.  The SET SKIP ON/OFF commands enable or disable the satisfying of the master detail relationship defined with the SET SKIP TO <alias> command on a system wide basis.
  
  
Line 37: Line 30:
 
set skip on
 
set skip on
 
set relation to cust_code into invoices
 
set relation to cust_code into invoices
set skip to order, invoices</code>
+
set skip to orders, invoices
 +
</code>
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|SKIP]]
 
[[Category:Set_Commands|SKIP]]
 +
[[Category:Table Basics]]
 +
[[Category:Table Basics SET Commands]]

Latest revision as of 09:57, 16 August 2010

Purpose

Automatically establishes one-to-many relationships across related tables


Syntax

SET SKIP TO [<alias>, ...]

SET SKIP ON | OFF | (<expL>)


See Also

ALIAS(), CREATE VIEW, DBRSELECT(), DISPLAY, INDEX, LIST, REPORT, SELECT, SET FILTER, SET RELATION, SET VIEW, SKIP, TARGET(), USE


Description

The SET SKIP TO <alias> command allows for master to detail relationships between tables. It allows you to access all detail records in a related table. This command is only effective when SET RELATION is ON, and when a relationship exists between data files. The SET SKIP TO <alias> command operates by starting at the innermost relationship and scanning for all duplicate relationship keys to satisfy all detail records for the relationship. It then skips up a level in the relationship chain and performs the same operation on that data file. The record pointer in all specified related data files will update before the record pointer in the active data file is changed. Then it skips up to the master data file, reading the next record and setting up related data files.

Master to detail relationships that have been set up with the SET SKIP TO <alias> command only affect the DISPLAY, LIST and REPORT commands. The SET SKIP TO command disables relationships previously set with the SET SKIP <alias> command. The SET SKIP ON/OFF commands enable or disable the satisfying of the master detail relationship defined with the SET SKIP TO <alias> command on a system wide basis.


Example

select c
use invoices index cust_code
select b
use orders
set relation to cust_code into invoices
select a
use customers
set skip on
set relation to cust_code into invoices
set skip to orders, invoices

Products

Recital Server, Recital