Path: utzoo!mnetor!uunet!husc6!mailrus!ames!ncar!noao!arizona!naucse!wew From: wew@naucse.UUCP (Bill Wilson) Newsgroups: comp.databases Subject: Re: dBaseIII+ Message-ID: <640@naucse.UUCP> Date: 18 Apr 88 17:24:50 GMT References: <2413@mandrill.CWRU.Edu> Organization: Northern Arizona University, Flagstaff, AZ Lines: 29 Keywords: dBaseIII+, Existential Quantifiers Summary: Finding a record in a set relation in DB3+ In article <2413@mandrill.CWRU.Edu>, ananth@mandrill.CWRU.Edu (ananth srinivasan) writes: > I have a problem with dBaseIII+ syntax and would appreciate any help. > I have two relations with join-able attributes (say ID) and I need > to find out those ID's that exist in one and don't exist in the other. > In SQL I can use the NOT EXISTS syntax; in QUEL I can use the > ANY...=0 syntax; and in Rbase V I can use the SUBTRACT operator > (which really makes the most sense). My question is what is the > appropriate syntax in dBase? After setting your relations up, try the following: select 1 accept 'Enter ID: ' to ID seek ID select 2 if eof() ? 'That ID is not in the second database.' endif This assumes that ID is a character field and that the files are indexed on ID for both. If you hve any other problems feel free to contact me. I have some friends that do custom dBASE work if you have any good sized projects. Bill Wilson 602-523-6461 Bitnet: ucc2wew@nauvm