Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!uwm.edu!zaphod.mps.ohio-state.edu!samsung!rex!ames!uhccux!bigtuna!pegasus!tleylan From: tleylan@pegasus.com (Tom Leylan) Newsgroups: comp.databases Subject: Re: Wildcard searches in dBASE -or- Clipper Keywords: dBASE Clipper Message-ID: <1991Feb7.090258.13993@pegasus.com> Date: 7 Feb 91 09:02:58 GMT References: <1991Feb6.002241.4960@oeo2.uucp> Distribution: usa Organization: Pegasus, Honolulu Lines: 38 In article <1991Feb6.002241.4960@oeo2.uucp> greinkem@oeo2.uucp (Mark Greinke) writes: >I hope somebody out there can help me. I am trying to implement a >wildcard indexed search under dBASE III+ (eventually to be compiled >using Clipper, Summer '87). Is there a way to do this? > >Basically if the user inputs a search string such as "BOGOTA" >it would find valid matches in "AMEMBASSY BOGOTA" and > "AMERICAN EMBASSY BOGOTA" and > "AMB BOGOTA" > >I know this can be done under Informix, but the customer wants all >the work to be done in dBASE or Clipper. If it cannot be done, >can you point me to a manual or book which documents this fact. > Mark, Clipper would offer the superior solution in many ways most notably speed. In order to do substring comparisons you would have to use the LOCATE command which must search every record until it finds a match and of course if there is no match it scans the entire file. (This is just the nature of substring searches). If you are willing to search "progressively" on the key field matches will be near instantaneous. You could type in "A" and have the A's listed on the screen and then type "M" and have the AM's listed and then "AME". This is extremely "cool" for the user since they narrow in on what they are looking for and if they spell something wrong "AMERACAN" there wouldn't be any listed so they delete characters until they see the entry they're looking for. That method eliminates the "enter a key", "search the key", "report on key" cycle if somebody doesn't exactly know what they are looking for. If the three "BOGOTA" entries you use refer to the same place then you'll want to isolate then name (normalize the file) to eliminate the spelling variations. More questions ? Let me know. tom leylan tleylan@pegasus.com ex-Senior Systems Analyst / Nantucket Corporation