ldc@cbnewsm.ATT.COM (derrick.j.mitchell) (01/08/90)
First I must say thanks to the answers to my previous question. My other problem is the followings: USE parts SET INDEX TO parts SELECT 0 && Get the next available work space USE supplier SET INDEX TO supplier SELECT 0 USE custpart SET INDEX TO custpart SET RELATION TO part_no INTO parts, id INTO supplier When I compile the above using "Clipper Sum/87" I get a "SET RELATION error". From what I read in the manuals the above should work. The data file "parts" is INDEXed on part_no. Also, the data file "supplier" is INDEXed on id. If I try splitting it into two SET RELATION there is no error. SET RELATION part_no INTO parts SET RELATION id INTO suplier However, the last SET RELATION canceled the previous one, as expected. If after splitting the command I add the ADDITIVE option to the Clipper compiler flags an error and ignore the ADDITIVE SET RELATION part_no INTO parts ADDITIVE SET RELATION id INTO suplier ADDITIVE It is now sunday evening...... I give up. Again Thanks in advance for you help.
nfs0294@dsac.dla.mil (Glendell R. Midkiff) (01/08/90)
From article <8328@cbnewsm.ATT.COM>, by ldc@cbnewsm.ATT.COM (derrick.j.mitchell): > SET INDEX TO custpart > SET RELATION TO part_no INTO parts, id INTO supplier > When I compile the above using "Clipper Sum/87" I get a > "SET RELATION error". I had the same problem when I first started using the SET RELATION Command. Try splitting the line and use a ';' at the end of the first line: SET RELATION TO part_no INTO parts,; TO id INTO supplier See the example on page 5-182 of the manual. -- |-----------------------------------------------------------------------| |Glen Midkiff osu-cis!dsacg1!gmidkiff | |From the Internet: gmidkiff@dsac.dla.mil | |Phone: (614)-238-9643 @DLA, Systems Automation Center, Columbus, Oh. |
chuckb@lotex.UUCP (Chuck Bentley) (01/09/90)
In article <8328@cbnewsm.ATT.COM>, ldc@cbnewsm.ATT.COM (derrick.j.mitchell) writes: > First I must say thanks to the answers to my previous question. How about posting a summary of your question and the answers so that others might share in your good fortune. Chuck...
jbrown@herron.uucp (Jordan Brown) (01/09/90)
nfs0294@dsac.dla.mil (Glendell R. Midkiff) writes: > From article <8328@cbnewsm.ATT.COM>, by ldc@cbnewsm.ATT.COM (derrick.j.mitchell): > > SET RELATION TO part_no INTO parts, id INTO supplier > Try splitting the line and use a ';' at the end of the first line: If that makes a difference, Clipper is broken. > SET RELATION TO part_no INTO parts,; > TO id INTO supplier What's really important here, I would guess (without looking at the manual) is that Glendell's example has a "TO" on the second clause, and Derrick's doesn't. -- Jordan Brown jbrown@jato.jpl.nasa.gov
timk@xenitec.on.ca (Tim Kuehn) (01/10/90)
<1632@dsac.dla.mil> nfs0294@dsac.dla.mil (Glendell R. Midkiff) writes: ><8328@cbnewsm.ATT.COM>, by ldc@cbnewsm.ATT.COM (derrick.j.mitchell): >> SET INDEX TO custpart >> SET RELATION TO part_no INTO parts, id INTO supplier >> When I compile the above using "Clipper Sum/87" I get a >> "SET RELATION error". > > I had the same problem when I first started using the SET RELATION > Command. > > Try splitting the line and use a ';' at the end of the first line: > > SET RELATION TO part_no INTO parts,; > TO id INTO supplier > > See the example on page 5-182 of the manual. Why bother with the ';' when the addition of the word "to" will fix the problem? i.e. set relation to part_no into parts, TO id into supplier ^^^ This word is VERY important to this statement!(As you've already found out.) +-----------------------------------------------------------------------------+ |Timothy D. Kuehn timk@xenitec.on.ca | |TDK Consulting Services !watmath!xenitec!timk | |871 Victoria St. North, Suite 217A | |Kitchener, Ontario, Canada N2B 3S4 (519)-741-3623 | |DOS/Xenix - SW/HW. uC, uP, DBMS. Quality SW Guaranteed | +-----------------------------------------------------------------------------+
nfs0294@dsac.dla.mil (Glendell R. Midkiff) (01/11/90)
From article <1990Jan10.040858.12072@xenitec.on.ca^, by timk@xenitec.on.ca (Tim Kuehn): ^ <1632@dsac.dla.mil^ nfs0294@dsac.dla.mil (Glendell R. Midkiff) writes: ^^<8328@cbnewsm.ATT.COM^, by ldc@cbnewsm.ATT.COM (derrick.j.mitchell): ^^^ SET INDEX TO custpart ^^^ SET RELATION TO part_no INTO parts, id INTO supplier ^^^ When I compile the above using "Clipper Sum/87" I get a ^^^ "SET RELATION error". ^^ ^^ I had the same problem when I first started using the SET RELATION ^^ Command. ^^ ^^ Try splitting the line and use a ';' at the end of the first line: ^^ ^^ SET RELATION TO part_no INTO parts,; ^^ TO id INTO supplier ^^ ^^ See the example on page 5-182 of the manual. ^ ^ Why bother with the ';' when the addition of the word "to" will fix the ^ problem? i.e. ^ ^ set relation to part_no into parts, TO id into supplier ^ ^^^ ^ This word is VERY important to this statement!(As you've already found out.) I never had any success setting multiple relations unless I placed each on a separate line and used the ';'. -- |-----------------------------------------------------------------------| |Glen Midkiff osu-cis!dsacg1!gmidkiff | |From the Internet: gmidkiff@dsac.dla.mil | |Phone: (614)-238-9643 @DLA, Systems Automation Center, Columbus, Oh. |
ldc@cbnewsm.ATT.COM (derrick.j.mitchell) (01/12/90)
As many people have pointed out to me the correct syntax is: SET RELATION TO <key> INTO <datafile1>, TO <key> INTO <datafile2> not: SET RELATION TO <key> INTO <datafile1>, <key> INTO <datafile2>