[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| SET SKIP |
+---------------------------------+
SET SKIP TO [<alias1>
[, <alias2>] ... ]
-----------------------------------
Creates one-to-many relationships between databases.
-----------------------------------
A one-to-many relationship is established in a manner similar to a
one-to-one relationship. The relationship between parent and child
database is first established with SET RELATION. Then, SET SKIP is
issued to create a one-to-many relationship.
[<alias1> [, <alias2>] ... ]
If parent database is related to several child databases, you may
include list of aliases (<alias1>, <alias2>, ... ) separated by commas
to create a one-to-many relationship with each child database.
In commands that supports scope (DISPLAY, LIST, etc.), records in parent
database will repeat for each corresponding record in the child
database.
To remove one-to-many relationship out of the currently selected work
area, use SET SKIP TO without any additional arguments. The one-to-one
relationship will still exist and can be removed with SET RELATION TO.
+---------------------------------+
| Program Example |
+---------------------------------+
In the following program example, a one-to-many relationship is created
with SET SKIP. A parent INVOICE database has fields containing the
invoice number and information about customer who placed the order. The
child LINEITMS database contains multiple records (the invoice items)
for each record in the parent database.
Parent database (INVOICE.DBF) is opened. Child database (LINEITMS.DBF)
is opened and order is set to invoice. Relationship between databases
is established on this field.
SET SKIP is issued to establish the one-to-many relationship between
parent and child. A BROWSE window is opened that contains fields from
both databases.
CLOSE ALL
CLEAR
SELECT 0 && Parent work area
USE invoice && Parent database
SELECT 0 && Child work area
USE lineitms && Child database
SET ORDER TO TAG invoice && Index relationship utilizes
SELECT invoice && Back to parent work area
SET RELATION TO invoice INTO lineitms && Establish relationship
SET SKIP TO lineitms && Make relationship one-to-many
** Show fields from parent (invoice) and child (item, descript) **
BROWSE FIELDS invoice.invoice, invoice.company, lineitms.quantity,;
lineitms.descript NOWAIT
-----------------------------------
See Also: RELATION(), SELECT, SET RELATION, SET RELATION OFF, TARGET()
-----------------------------------
See Also:
RELATION()
SELECT
SET RELATION
SET RELATION OFF
TARGET()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson