Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Fuzzy search
On 23 Jan 2004 07:41:29 GMT, Rene Nyffenegger
<rene.nyffenegger_at_gmx.ch> wrote:
>> They want to be able to retrieve the record if the type in any of the following:
>>
>> A. B. Corp
>> A.B. Corp
>> AB Corp
>> A.B Corp, etc.
>>
>> I currently use SPs to retrieve the records from a VB program. Is there something I could add to the SP to provide this
>> functionality without severely effecting performance?
>
>Al Reid,
>
>I had a similar problem (although not exactly the same) with searching
>for german names. To solve it, I have written a function for fuzzy
>searching. You find it on my homepage: at
>http://www.adp-gmbh.ch/ora/plsql/fuzzy_search.html
>
>hth
>Rene
>
Another approach to this, that doesn't involve hard coding any values
is available via the package owa_pattern
From
http://www.stormloader.com/yonghuang/computer/OracleRegExp.html
e.g. The regular expression string
.* \d\d\d[!.,]
matches zero or all characters (signified by the dot and *) in a given
string up to and including a space, followed by 3 digits (three \d)
and any one of !, . or ,.
The characters in the brackets [] are a character class, meaning any
one of the enclosed characters.
-
Simon Sheppard
http://www.ss64.com
-
Received on Sat Jan 24 2004 - 08:20:57 CST