Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: How to find...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 8 Topic 3409 of 3799
Post > Topic >>

Re: How to find double entries

by yazicivo@[EMAIL PROTECTED] (Volkan YAZICI) Apr 16, 2008 at 09:15 AM

On Wed, 16 Apr 2008, Andreas <maps.on@[EMAIL PROTECTED]
> writes:
> how can I find double entries in varchar columns where the content is
> not 100% identical because of a spelling error or the person
> considered it "looked nicer" that way?
>
> I'd like to identify and then merge records of e.g.   'google',
> gogle', 'guugle' 
>
> Then I want to match abbrevations like  'A-Company Ltd.', 'a company
> ltd.', 'A-Company Limited'
>
> Is there a way to do this?
> It would be OK just to list candidats up to be manually checked
> afterwards.

You can try something similar to below example. (levenshtein(text, text)
function is supplied by fuzzystrmatch module.)

SELECT T1.col, T2.col
  FROM tbl AS T1,
       INNER JOIN tbl AS T2
               ON T1.col <> T2.col AND
                  levenshtein(T1.col, T2.col) < (length(T1.col) * 0.5)


Regards.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 8 Posts in Topic:
How to find double entries
maps.on@[EMAIL PROTECTED]  2008-04-16 05:15:43 
Re: How to find double entries
craig@[EMAIL PROTECTED]   2008-04-16 12:22:57 
Re: How to find double entries
tgl@[EMAIL PROTECTED] (T  2008-04-15 23:23:32 
Re: How to find double entries
vivek@[EMAIL PROTECTED]   2008-04-16 10:27:49 
Re: How to find double entries
craig@[EMAIL PROTECTED]   2008-04-16 23:49:23 
Re: How to find double entries
tsakai@[EMAIL PROTECTED]   2008-04-15 22:05:58 
Re: How to find double entries
yazicivo@[EMAIL PROTECTED  2008-04-16 09:15:42 
Re: How to find double entries
jeandavid8@[EMAIL PROTECT  2008-04-19 21:54:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 21:56:14 CST 2008.