× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I seem to recall some discussions in the past about various algorithms
that would help identify duplicate customers names or some such field where
you can't depend on an exact match.

I just threw this together in iSeries Nav Run SQL scripts. It relys upon the
soundex function of SQL to help with the task:

drop table miketest.customers;
create table miketest.customers like v84files#.mscmp100;
INSERT INTO MIKETEST.CUSTOMERS SELECT * FROM v84files#.mscmp100 WHERE
activ='1';
ALTER TABLE MIKETEST.CUSTOMERS ADD COLUMN SOUNDS FOR COLUMN SOUNDSLIKE
CHARACTER (4 ) NOT NULL WITH DEFAULT ' ';
update miketest.customers set sounds=soundex(cname);
with dups as (select sounds,count(*) from miketest.customers group by sounds
having count(*)>1) select a.sounds,a.cname,a.cusno,a.* from
miketest.customers a where a.sounds in (select sounds from dups) order by
a.sounds,a.cname,a.cusno;

In English...
Drop the temporary table.
Create a temporary table.
Insert all active customer records into temporary table.
Add a column for the SOUNDEX match.
Create the SOUNDEX field for each customer name.
Use a common table expression to find the duplicate SOUNDEX records to find
all the records with SOUNDEX matches.

This method didn't result in any earth shattering results for me (way too
results for one thing). But you should try it on your system and see how it
looks.

Mike Krebs


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.