Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!mahendo!wlbr!hacgate!ashtate!dbase!awd From: awd@dbase.A-T.COM (Alastair Dallas) Newsgroups: comp.databases Subject: Re: dBaseIV: SET RELATION Help Needed (semi-long) Summary: You've got it... Keywords: dbase, set relation, neophyte question Message-ID: <471@dbase.A-T.COM> Date: 17 Mar 90 15:45:05 GMT References: <632@cica.cica.indiana.edu> Distribution: comp Organization: Ashton Tate Development Center Glendale, Calif. Lines: 24 Your posting looks like you understand the SET RELATION command well enough to make it do what you want. It's not clear, but it seems as if the LAST field is redundant in the RPUBS table. Also, you say that the main reason for separating the two tables is that one is rather large; actually, the main reason for separating them should be their one-to-many relationship (one author may write several publications). Your code looks fine, but using dBASE IV you can be more concise. Specifically, use MODIFY STRUCTURE to specify an index on the field 'RID' in table R. This will create a production MDX file (R.MDX). Then your setup code looks like: SELECT 1 USE "RPUBS" USE "R" IN 2 ORDER RID SET RELATION TO RID INTO R DISPLAY B1, P1, D1, R->First, R->Last Hope it helps. /alastair/