Let L = levenshtein distance Similarity = LEN(Str1) - L / LEN(Str1)
This gives you a metric that's kinda similar to SIMILAR. On Tue, Mar 25, 2008 at 10:44 AM, Alec Joseph L. Rivera <[EMAIL PROTECTED]> wrote: > Good morning fellow plugger.. OT question related to database. In ASE, > there is a SIMILAR function that returns a percentage value (integer > between 1 - 100) on the similarity of two text columns. > > I was just wondering if there's a function in PostgreSQL or MySQL that > provides the same functionality? Yup, I've read about the related > functions (soundex, difference, levenshtein, etc.). > > Is it also possible that this one's gone to obscurity because of the > SIMILAR TO syntax? I've googled this one in every way that I could think > of but haven't found anything.. > > -- > Alec Joseph Rivera > F S 3 Consulting Inc. > http://www.fs3.ph > > _________________________________________________ > Philippine Linux Users' Group (PLUG) Mailing List > [email protected] (#PLUG @ irc.free.net.ph) > Read the Guidelines: http://linux.org.ph/lists > Searchable Archives: http://archives.free.net.ph > -- Orlando Andico +63.2.976.8659 | +63.920.903.0335 "I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone." -- Bjarne Stroustrup _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

