Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

skipping records in a child table

Status
Not open for further replies.

benny7

Programmer
Oct 3, 2004
31
GB
I have two tables with a one to many relationship. Currently I've linked them as below:

select 0
use shares && child
set order to client
select 0
use client && Parent
set relation to client.sysref into shares
set order to sysref
seek 101

The shares table can have many records associated with the client table. I want to skip 1 record at a time in the child table, but only for the client record selected. Is there a way I can do it without skipping one and checking the linked fields still match?

 
I would select into shares and use a SCAN WHILE loop to go through all the child records.

By the way, another way of opening the tables would be to open the client table first and then execute the line
Code:
use shares in 0 order client


Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
You can use SET SKIP TO relation. Read about it in help.
SET RELATION is ONE to ONE relation (i hope), then SET SKIP makes ONE to MANY.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top