Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!nyser!njin!princeton!phoenix!englandr From: englandr@phoenix.Princeton.EDU (Scott Englander) Newsgroups: comp.databases Subject: Re: Avoiding SET FILTER TO command Summary: Use LOCATE and FOR instead Message-ID: <9636@phoenix.Princeton.EDU> Date: 28 Jul 89 02:01:01 GMT References: <472@uncmed.med.unc.edu> Reply-To: englandr@phoenix.Princeton.EDU (Scott Englander) Organization: Princeton University, NJ Lines: 18 In article <472@uncmed.med.unc.edu> danielg@uncmed.med.unc.edu () writes: > I have a problem to which I *know* there is a simple answer. I > have to locate a record in my database by two fields. I have > tried SET FILTER TO the first, then using a FIND command to > pinpoint my record, but as you might expect, this is ** much too > slow ***. Let's say you want the record where field1 = x and field2 = y, where x and y are expressions appropriate to the respective field type. Then all you need to do is LOCATE FOR field1 = x .and. field2 = y This might still take a while, but should be faster than SET FILTER TO. Hope this helps. -- - Scott