CLOSE DATABASES
* Creates parent table with values a and b in Name field
CREATE CURSOR Parent (Name C(1), Val C(10))
INSERT INTO Parent VALUES ('a', 'Parent.a1')
INSERT INTO Parent VALUES ('b', 'Parent.b1')
SELECT 0 && Child1 will have two a's and two b's
CREATE CURSOR Child1 (Name1 C(1), Val C(10))
INSERT INTO Child1 VALUES ('a', 'Child1.a1')
INSERT INTO Child1 VALUES ('b', 'Child1.b1')
INSERT INTO Child1 VALUES ('b', 'Child1.b2')
INSERT INTO Child1 VALUES ('a', 'Child1.a2')
INDEX ON Name1 TAG tagName && The tag name is irrelevant
SELECT 0 && Child2 will have two a's and two b's
CREATE CURSOR Child2 (Name2 C(1), Val C(10))
INSERT INTO Child2 VALUES ('b', 'Child1.b1')
INSERT INTO Child2 VALUES ('b', 'Child1.b2')
INSERT INTO Child2 VALUES ('a', 'Child1.a1')
INSERT INTO Child2 VALUES ('a', 'Child1.a2')
INDEX ON Name2 TAG tagName && The tag name is irrelevant
SELECT Child1
SET RELATION TO Name1 INTO Child2
SELECT Parent
SET RELATION TO Name INTO Child1
SET SKIP TO Child1, Child2 && Parent gets both skips.
&& Otherwise, only four record triplets
&& would be listed.
*SELECT Parent
GO TOP
BROWSE FIELDS parent.val, child1.val:H="C1 Val", ;
child2.val:H="C2 Val" nowait